jpa/subsystem/src/main/java/org/jboss/as/jpa/service/PhaseOnePersistenceUnitServiceImpl.java
private EntityManagerFactoryBuilder createContainerEntityManagerFactoryBuilder() {
        persistenceProviderAdaptor.beforeCreateContainerEntityManagerFactory(pu);
        try {
            TwoPhaseBootstrapCapable twoPhaseBootstrapCapable = (TwoPhaseBootstrapCapable)persistenceProviderAdaptor;
            return twoPhaseBootstrapCapable.getBootstrap(pu, properties.getValue());
        } finally {
            try {
                persistenceProviderAdaptor.afterCreateContainerEntityManagerFactory(pu);
            } finally {
                pu.setAnnotationIndex(null);    // close reference to Annotation Index (only needed during call to createContainerEntityManagerFactory)
            }
        }
    }
private EntityManagerFactoryBuilder createContainerEntityManagerFactoryBuilder() {
        persistenceProviderAdaptor.beforeCreateContainerEntityManagerFactory(pu);
        try {
            TwoPhaseBootstrapCapable twoPhaseBootstrapCapable = (TwoPhaseBootstrapCapable)persistenceProviderAdaptor;
            return twoPhaseBootstrapCapable.getBootstrap(pu, properties.getValue());
        } finally {
            try {
                persistenceProviderAdaptor.afterCreateContainerEntityManagerFactory(pu);
            } finally {
                pu.setAnnotationIndex(null);    // close reference to Annotation Index (only needed during call to createContainerEntityManagerFactory)
            }
        }
    }
private EntityManagerFactoryBuilder createContainerEntityManagerFactoryBuilder ( ) { persistenceProviderAdaptor . beforeCreateContainerEntityManagerFactory ( pu ) ; try { TwoPhaseBootstrapCapable twoPhaseBootstrapCapable = ( TwoPhaseBootstrapCapable ) persistenceProviderAdaptor ; return twoPhaseBootstrapCapable . getBootstrap ( pu , properties . getValue ( ) ) ; } finally { try { persistenceProviderAdaptor . afterCreateContainerEntityManagerFactory ( pu ) ; } finally { pu . setAnnotationIndex ( null ) ; // close reference to Annotation Index (only needed during call to createContainerEntityManagerFactory) } } }
Create EE container entity manager factory

@return EntityManagerFactory
Create EE container entity manager factory