public class SessionFactoryRegistry
extends java.lang.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(java.lang.String uuid,
java.lang.String name,
boolean isNameAlsoJndiName,
SessionFactory instance,
JndiService jndiService)
Adds a SessionFactory to the registry
|
void |
clearRegistrations() |
SessionFactory |
findSessionFactory(java.lang.String uuid,
java.lang.String name) |
SessionFactory |
getNamedSessionFactory(java.lang.String name)
Get a registered SessionFactory by name
|
SessionFactory |
getSessionFactory(java.lang.String uuid) |
boolean |
hasRegistrations()
Does this registry currently contain registrations?
|
void |
removeSessionFactory(java.lang.String uuid,
java.lang.String name,
boolean isNameAlsoJndiName,
JndiService jndiService)
Remove a previously added SessionFactory
|
public static final SessionFactoryRegistry INSTANCE
public void addSessionFactory(java.lang.String uuid, java.lang.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(java.lang.String uuid, java.lang.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(java.lang.String name)
name
- The namepublic SessionFactory getSessionFactory(java.lang.String uuid)
public SessionFactory findSessionFactory(java.lang.String uuid, java.lang.String name)
public boolean hasRegistrations()
public void clearRegistrations()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.