public class EntityManagerFactoryRegistry extends Object
EntityManagerFactoryImpl instances for the same
classloader as this class.
This registry is used for serialization/deserialization of entity managers.| Modifier and Type | Field and Description |
|---|---|
static EntityManagerFactoryRegistry |
INSTANCE |
| Constructor and Description |
|---|
EntityManagerFactoryRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntityManagerFactory(String name,
EntityManagerFactory entityManagerFactory)
register the specified entity manager factory
|
EntityManagerFactory |
getNamedEntityManagerFactory(String name)
Lookup the specified entity manager factory by name
|
void |
removeEntityManagerFactory(String name,
EntityManagerFactory entityManagerFactory)
remove the specified entity manager factory from the EntityManagerFactoryRegistry
|
public static final EntityManagerFactoryRegistry INSTANCE
public void addEntityManagerFactory(String name, EntityManagerFactory entityManagerFactory)
name - to register the passed entity manager factoryentityManagerFactory - public void removeEntityManagerFactory(String name, EntityManagerFactory entityManagerFactory) throws HibernateException
name - entityManagerFactory - HibernateException - if the specified entity manager factory could not be found in the registrypublic EntityManagerFactory getNamedEntityManagerFactory(String name) throws HibernateException
name - HibernateException - if entity manager factory is not found or if more than one
entity manager factory was registered with name.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.