public class JwigCurrentSessionContext extends Object implements CurrentSessionContext, dk.brics.jwig.server.SessionManagerListener, dk.brics.jwig.server.DispatchListener
| Modifier and Type | Field and Description |
|---|---|
protected SessionFactoryImplementor |
factoryImplementor |
| Constructor and Description |
|---|
JwigCurrentSessionContext(SessionFactoryImplementor factoryImplementor) |
| Modifier and Type | Method and Description |
|---|---|
Session |
currentSession() |
static JwigCurrentSessionContext |
getCurrentSessionContext()
Gets the object that is the current session context.
|
boolean |
isAutoCloseEnabled()
Returns whether or not the the session should be closed by transaction completion.
|
boolean |
isAutoFlushEnabled()
Returns whether or not the the session should be flushed prior to transaction completion.
|
void |
sessionCreated(Session s)
Invoked by the session manager when a session is created.
|
void |
sessionEnded(Session s)
Invoked by the session manager when a session is ended in a normal way (not by timeout).
|
void |
sessionRefreshed(Session s)
Invoked by the session manager after a session is refreshed.
|
void |
sessionTimeout(Session s)
Invoked by the session manager when a session is ended by a timeout.
|
void |
setAutoCloseEnabled(boolean autoCloseEnabled)
Sets whether or not the the session should be closed by transaction completion.
|
void |
setAutoFlushEnabled(boolean autoFlushEnabled)
Sets whether or not the the session should be flushed prior to transaction completion.
|
void |
threadDismissed(Thread t)
Called when a thread leaves JWIG.
|
void |
threadDispatched(Thread t)
Called when a new thread enters the JWIG framework through the dispatcher.
|
protected SessionFactoryImplementor factoryImplementor
public JwigCurrentSessionContext(SessionFactoryImplementor factoryImplementor)
public Session currentSession() throws HibernateException
currentSession in interface CurrentSessionContextHibernateExceptionpublic static JwigCurrentSessionContext getCurrentSessionContext()
public boolean isAutoCloseEnabled()
public boolean isAutoFlushEnabled()
public void sessionCreated(Session s)
dk.brics.jwig.server.SessionManagerListenersessionCreated in interface dk.brics.jwig.server.SessionManagerListenerpublic void sessionEnded(Session s)
dk.brics.jwig.server.SessionManagerListenersessionEnded in interface dk.brics.jwig.server.SessionManagerListenerSession.end()public void sessionRefreshed(Session s)
dk.brics.jwig.server.SessionManagerListenersessionRefreshed in interface dk.brics.jwig.server.SessionManagerListenerpublic void sessionTimeout(Session s)
dk.brics.jwig.server.SessionManagerListenersessionTimeout in interface dk.brics.jwig.server.SessionManagerListenerpublic void setAutoCloseEnabled(boolean autoCloseEnabled)
public void setAutoFlushEnabled(boolean autoFlushEnabled)
public void threadDismissed(Thread t)
dk.brics.jwig.server.DispatchListenerDispatchListener.threadDispatched(Thread) can be assumed to have been called with the thread
before this method is calledthreadDismissed in interface dk.brics.jwig.server.DispatchListenerpublic void threadDispatched(Thread t)
dk.brics.jwig.server.DispatchListenerthreadDispatched in interface dk.brics.jwig.server.DispatchListenerCopyright © 2008-2012 Anders Møller & Mathias Schwarz.