public class SessionFactoryRegistry extends Object
SessionFactory instances for the same classloader as this class.
 This registry is used for serialization/deserialization as well as JNDI binding.| Modifier and Type | Class and Description | 
|---|---|
static class  | 
SessionFactoryRegistry.ObjectFactoryImpl  | 
| Modifier and Type | Field and Description | 
|---|---|
static SessionFactoryRegistry | 
INSTANCE
Singleton access 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addSessionFactory(String uuid,
                 String name,
                 boolean isNameAlsoJndiName,
                 SessionFactory instance,
                 JndiService jndiService)
Adds a SessionFactory to the registry 
 | 
void | 
clearRegistrations()  | 
SessionFactory | 
getNamedSessionFactory(String name)
Get a registered SessionFactory by name 
 | 
SessionFactory | 
getSessionFactory(String uuid)  | 
boolean | 
hasRegistrations()
Does this registry currently contain registrations? 
 | 
void | 
removeSessionFactory(String uuid,
                    String name,
                    boolean isNameAlsoJndiName,
                    JndiService jndiService)
Remove a previously added SessionFactory 
 | 
public static final SessionFactoryRegistry INSTANCE
public void addSessionFactory(String uuid, String name, boolean isNameAlsoJndiName, SessionFactory instance, JndiService jndiService)
uuid - The uuid under which to register the SessionFactoryname - The optional name under which to register the SessionFactoryisNameAlsoJndiName - Is name, if provided, also a JNDI name?instance - The SessionFactory instancejndiService - The JNDI service, so we can register a listener if name is a JNDI namepublic void removeSessionFactory(String uuid, String name, boolean isNameAlsoJndiName, JndiService jndiService)
uuid - The uuidname - The optional nameisNameAlsoJndiName - Is name, if provided, also a JNDI name?jndiService - The JNDI servicepublic SessionFactory getNamedSessionFactory(String name)
name - The namepublic SessionFactory getSessionFactory(String uuid)
public boolean hasRegistrations()
public void clearRegistrations()
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.