org.dentaku.services.persistence.hibernate
Class ThreadLocalSessionProvider

java.lang.Object
  extended byorg.dentaku.services.persistence.hibernate.ThreadLocalSessionProvider
All Implemented Interfaces:
org.codehaus.plexus.logging.LogEnabled, SessionProvider

public class ThreadLocalSessionProvider
extends java.lang.Object
implements SessionProvider, org.codehaus.plexus.logging.LogEnabled


Field Summary
 
Fields inherited from interface org.dentaku.services.persistence.hibernate.SessionProvider
ROLE
 
Constructor Summary
ThreadLocalSessionProvider()
           
 
Method Summary
 void enableLogging(org.codehaus.plexus.logging.Logger logger)
           
 net.sf.hibernate.Session getSession()
           
static net.sf.hibernate.Session getThreadLocalSession()
           
 void releaseSession()
           
 void releaseSessionImpl()
           
 void resetSession()
           
 void rollback()
           
static void rollbackImpl()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadLocalSessionProvider

public ThreadLocalSessionProvider()
Method Detail

getSession

public net.sf.hibernate.Session getSession()
                                    throws PersistenceException
Specified by:
getSession in interface SessionProvider
Throws:
PersistenceException

getThreadLocalSession

public static net.sf.hibernate.Session getThreadLocalSession()
                                                      throws PersistenceException
Throws:
PersistenceException

resetSession

public void resetSession()
                  throws PersistenceException
Specified by:
resetSession in interface SessionProvider
Throws:
PersistenceException

releaseSession

public void releaseSession()
                    throws PersistenceException
Specified by:
releaseSession in interface SessionProvider
Throws:
PersistenceException

releaseSessionImpl

public void releaseSessionImpl()
                        throws PersistenceException
Throws:
PersistenceException

rollback

public void rollback()
Specified by:
rollback in interface SessionProvider

rollbackImpl

public static void rollbackImpl()

enableLogging

public void enableLogging(org.codehaus.plexus.logging.Logger logger)
Specified by:
enableLogging in interface org.codehaus.plexus.logging.LogEnabled


Copyright © -2004 . All Rights Reserved.