jpa/subsystem/src/main/java/org/jboss/as/jpa/container/SFSBCallStack.java
public static void beginSfsbCreation() {
        SFSBCallStackThreadData data = CURRENT.get();
        int no = data.creationBeanNestingLevel;
        if (no == 0) {
            data.creationTimeXPCRegistration = new HashMap<String, ExtendedEntityManager>();
            // create new tracking structure (passing in parent levels tracking structure or null if toplevel)
            data.creationTimeInjectedXPCs = new SFSBInjectedXPCs(data.creationTimeInjectedXPCs, null);
        }
        else {
            // create new tracking structure (passing in parent levels tracking structure or null if toplevel)
            SFSBInjectedXPCs parent = data.creationTimeInjectedXPCs;
            data.creationTimeInjectedXPCs = new SFSBInjectedXPCs(parent, parent.getTopLevel());
        }
        data.creationBeanNestingLevel++;
    }
public static void beginSfsbCreation() {
        SFSBCallStackThreadData data = CURRENT.get();
        int no = data.creationBeanNestingLevel;
        if (no == 0) {
            data.creationTimeXPCRegistration = new HashMap<String, ExtendedEntityManager>();
            // create new tracking structure (passing in parent levels tracking structure or null if toplevel)
            data.creationTimeInjectedXPCs = new SFSBInjectedXPCs(data.creationTimeInjectedXPCs, null);
        }
        else {
            // create new tracking structure (passing in parent levels tracking structure or null if toplevel)
            SFSBInjectedXPCs parent = data.creationTimeInjectedXPCs;
            data.creationTimeInjectedXPCs = new SFSBInjectedXPCs(parent, parent.getTopLevel());
        }
        data.creationBeanNestingLevel++;
    }
called from SFSBPreCreateInterceptor, before bean creation