org.hibernate.ejb.internal
Class EntityManagerFactoryRegistry
java.lang.Object
org.hibernate.ejb.internal.EntityManagerFactoryRegistry
public class EntityManagerFactoryRegistry
- extends Object
An internal registry of all EntityManagerFactoryImpl
instances for the same
classloader as this class.
This registry is used for serialization/deserialization of entity managers.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final EntityManagerFactoryRegistry INSTANCE
EntityManagerFactoryRegistry
public EntityManagerFactoryRegistry()
addEntityManagerFactory
public void addEntityManagerFactory(String name,
EntityManagerFactory entityManagerFactory)
- register the specified entity manager factory
- Parameters:
name
- to register the passed entity manager factoryentityManagerFactory
-
removeEntityManagerFactory
public void removeEntityManagerFactory(String name,
EntityManagerFactory entityManagerFactory)
throws HibernateException
- remove the specified entity manager factory from the EntityManagerFactoryRegistry
- Parameters:
name
- entityManagerFactory
-
- Throws:
HibernateException
- if the specified entity manager factory could not be found in the registry
getNamedEntityManagerFactory
public EntityManagerFactory getNamedEntityManagerFactory(String name)
throws HibernateException
- Lookup the specified entity manager factory by name
- Parameters:
name
-
- Returns:
-
- Throws:
HibernateException
- if entity manager factory is not found or if more than one
entity manager factory was registered with name.
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.