jpa/subsystem/src/main/java/org/jboss/as/jpa/container/SFSBCallStack.java
public static void endSfsbCreation() {
        SFSBCallStackThreadData data = CURRENT.get();
        int no =  data.creationBeanNestingLevel;
        no--;
        data.creationBeanNestingLevel = no;

        if (no == 0) {
            // Completed creating top level bean, remove 'xpc creation tracking' thread local
            data.creationTimeXPCRegistration = null;
            data.creationTimeInjectedXPCs = null;
        }
        else {
            // finished creating a sub-bean, switch to parent level 'xpc creation tracking'
            data.creationTimeInjectedXPCs = data.creationTimeInjectedXPCs.getParent();
        }
    }
public static void endSfsbCreation() {
        SFSBCallStackThreadData data = CURRENT.get();
        int no =  data.creationBeanNestingLevel;
        no--;
        data.creationBeanNestingLevel = no;

        if (no == 0) {
            // Completed creating top level bean, remove 'xpc creation tracking' thread local
            data.creationTimeXPCRegistration = null;
            data.creationTimeInjectedXPCs = null;
        }
        else {
            // finished creating a sub-bean, switch to parent level 'xpc creation tracking'
            data.creationTimeInjectedXPCs = data.creationTimeInjectedXPCs.getParent();
        }
    }
called from SFSBPreCreateInterceptor, after bean creation