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(JPAConfigSupport jpaConfigSupport)
-
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 shutdown all instances of Hibernate ORM before the actual destroy event, as it might need to use the datasources during shutdown.javax.persistence.EntityManagerFactory
getEntityManagerFactory(String unitName)
Set<String>
getPersistenceUnits()
Returns the registered persistence units.Set<String>
getPersistenceUnitsForEntity(String entityClass)
Returns the set of persistence units an entity is attached to.(package private) void
startAll()
-
-
-
Constructor Detail
-
JPAConfig
@Inject public JPAConfig(JPAConfigSupport jpaConfigSupport)
-
-
Method Detail
-
startAll
void startAll()
-
getEntityManagerFactory
public javax.persistence.EntityManagerFactory getEntityManagerFactory(String unitName)
-
getPersistenceUnits
public Set<String> getPersistenceUnits()
Returns the registered persistence units.- Returns:
- Set containing the names of all registered persistence units.
-
getPersistenceUnitsForEntity
public Set<String> getPersistenceUnitsForEntity(String entityClass)
Returns the set of persistence units an entity is attached to.
-
destroy
void destroy(@Observes @BeforeDestroyed(javax.enterprise.context.ApplicationScoped.class) Object event)
Need to shutdown 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()
-
-