Class HibernateSessionManagerImpl
- java.lang.Object
 - 
- org.apache.tapestry5.hibernate.internal.HibernateSessionManagerImpl
 
 
- 
- All Implemented Interfaces:
 EventListener,HibernateSessionManager,ThreadCleanupListener
public class HibernateSessionManagerImpl extends Object implements HibernateSessionManager, ThreadCleanupListener
 
- 
- 
Constructor Summary
Constructors Constructor Description HibernateSessionManagerImpl(HibernateSessionSource source) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Aborts the current transaction, and starts a new transaction to replace it.voidcommit()Commits the current transaction (which will cause a flush of data to the database), then starts a new transaction to replace it.org.hibernate.SessiongetSession()Gets the active session for this request, creating it as necessary.voidthreadDidCleanup()Rollsback the transaction at the end of the request, then closes the session. 
 - 
 
- 
- 
Constructor Detail
- 
HibernateSessionManagerImpl
public HibernateSessionManagerImpl(HibernateSessionSource source)
 
 - 
 
- 
Method Detail
- 
abort
public void abort()
Description copied from interface:HibernateSessionManagerAborts the current transaction, and starts a new transaction to replace it.- Specified by:
 abortin interfaceHibernateSessionManager
 
- 
commit
public void commit()
Description copied from interface:HibernateSessionManagerCommits the current transaction (which will cause a flush of data to the database), then starts a new transaction to replace it.- Specified by:
 commitin interfaceHibernateSessionManager
 
- 
getSession
public org.hibernate.Session getSession()
Description copied from interface:HibernateSessionManagerGets the active session for this request, creating it as necessary. When the session is first created, a transaction is started.- Specified by:
 getSessionin interfaceHibernateSessionManager- Returns:
 - the request's session
 - See Also:
 HibernateSessionSource
 
- 
threadDidCleanup
public void threadDidCleanup()
Rollsback the transaction at the end of the request, then closes the session. This means that any uncommitted changes are lost; code should inject the HSM and invokecommit()after making any changes, if they should persist.- Specified by:
 threadDidCleanupin interfaceThreadCleanupListener
 
 - 
 
 -