Class JPAConfig


  • @Singleton
    public class JPAConfig
    extends Object
    • Method Detail

      • startAll

        void startAll()
      • getEntityManagerFactory

        public javax.persistence.EntityManagerFactory getEntityManagerFactory​(String unitName)
      • getPersistenceUnits

        public Set<String> getPersistenceUnits()
        Returns the registered, active persistence units.
        Returns:
        Set containing the names of all registered, actives persistence units.
      • getDeactivatedPersistenceUnitNames

        public Set<String> getDeactivatedPersistenceUnitNames()
        Returns the name of persistence units that were deactivated through configuration properties.
        Returns:
        Set containing the names of all persistence units that were deactivated through configuration properties.
      • destroy

        void destroy​(@Observes @BeforeDestroyed(javax.enterprise.context.ApplicationScoped.class)
                     Object event)
        Need to shut down all instances of Hibernate ORM before the actual destroy event, as it might need to use the datasources during shutdown.
        Parameters:
        event - ignored
      • destroy

        @PreDestroy
        void destroy()