public class DelegatingSessionFactory<F> extends Object implements SessionFactory<F>
| Constructor and Description |
|---|
DelegatingSessionFactory(Map<Object,SessionFactory<F>> factories,
SessionFactory<F> defaultFactory)
Construct an instance with a
DefaultSessionFactoryLocator using the
supplied factories and default key. |
DelegatingSessionFactory(SessionFactoryLocator<F> factoryLocator)
Construct an instance using the supplied factory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearThreadKey()
Clear the key for this thread.
|
Message<?> |
clearThreadKey(Message<?> message)
Messaging-friendly version of
clearThreadKey() that can be invoked from
a service activator. |
SessionFactoryLocator<F> |
getFactoryLocator()
Return this factory's locator.
|
Session<F> |
getSession() |
Session<F> |
getSession(Object key) |
Message<?> |
setThreadKey(Message<?> message,
Object key)
Messaging-friendly version of
setThreadKey(Object) that can be invoked from
a service activator. |
void |
setThreadKey(Object key)
Set a key to be used for
getSession() on this thread. |
public DelegatingSessionFactory(Map<Object,SessionFactory<F>> factories, SessionFactory<F> defaultFactory)
DefaultSessionFactoryLocator using the
supplied factories and default key.factories - the factories.defaultFactory - the default to use if the lookup fails.public DelegatingSessionFactory(SessionFactoryLocator<F> factoryLocator)
factoryLocator - the factory.public SessionFactoryLocator<F> getFactoryLocator()
public void setThreadKey(Object key)
getSession() on this thread.key - the key.public void clearThreadKey()
public Message<?> setThreadKey(Message<?> message, Object key)
setThreadKey(Object) that can be invoked from
a service activator.message - the message.key - the key.public Message<?> clearThreadKey(Message<?> message)
clearThreadKey() that can be invoked from
a service activator.message - the message.public Session<F> getSession()
getSession in interface SessionFactory<F>