@Singleton public class JPAConfig extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
JPAConfig.LazyPersistenceUnit |
Constructor and Description |
---|
JPAConfig(JPAConfigSupport jpaConfigSupport) |
Modifier and Type | Method and 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() |
@Inject public JPAConfig(JPAConfigSupport jpaConfigSupport)
void startAll()
public javax.persistence.EntityManagerFactory getEntityManagerFactory(String unitName)
public Set<String> getPersistenceUnits()
public Set<String> getPersistenceUnitsForEntity(String entityClass)
void destroy(@Observes @BeforeDestroyed(value=javax.enterprise.context.ApplicationScoped.class) Object event)
event
- ignored@PreDestroy void destroy()
Copyright © 2021 JBoss by Red Hat. All rights reserved.