Package io.quarkus.hibernate.orm.runtime
Class JPAConfig
- java.lang.Object
-
- io.quarkus.hibernate.orm.runtime.JPAConfig
-
@Singleton public class JPAConfig extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
JPAConfig.LazyPersistenceUnit
-
Constructor Summary
Constructors Constructor Description JPAConfig(HibernateOrmRuntimeConfig hibernateOrmRuntimeConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
destroy()
(package private) void
destroy(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.Set<String>
getDeactivatedPersistenceUnitNames()
Returns the name of persistence units that were deactivated through configuration properties.javax.persistence.EntityManagerFactory
getEntityManagerFactory(String unitName)
Set<String>
getPersistenceUnits()
Returns the registered, active persistence units.(package private) void
startAll()
-
-
-
Constructor Detail
-
JPAConfig
@Inject public JPAConfig(HibernateOrmRuntimeConfig hibernateOrmRuntimeConfig)
-
-
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()
-
-