public class JwigCurrentSessionContext extends Object implements CurrentSessionContext, SessionManagerListener, 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)
SessionManagerListenersessionCreated in interface SessionManagerListenerpublic void sessionEnded(Session s)
SessionManagerListenersessionEnded in interface SessionManagerListenerSession.end()public void sessionRefreshed(Session s)
SessionManagerListenersessionRefreshed in interface SessionManagerListenerpublic void sessionTimeout(Session s)
SessionManagerListenersessionTimeout in interface SessionManagerListenerpublic void setAutoCloseEnabled(boolean autoCloseEnabled)
public void setAutoFlushEnabled(boolean autoFlushEnabled)
public void threadDismissed(Thread t)
DispatchListenerDispatchListener.threadDispatched(Thread) can be assumed to have been called with the thread
 before this method is calledthreadDismissed in interface DispatchListenerpublic void threadDispatched(Thread t)
DispatchListenerthreadDispatched in interface DispatchListenerCopyright © 2008-2012 Anders Møller & Mathias Schwarz.