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 -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()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.SessionGets the active session for this request, creating it as necessary.voidRollsback the transaction at the end of the request, then closes the session.
-
Constructor Details
-
HibernateSessionManagerImpl
-
-
Method Details
-
abort
Description copied from interface:HibernateSessionManagerAborts the current transaction, and starts a new transaction to replace it.- Specified by:
abortin interfaceHibernateSessionManager
-
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
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:
-
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
-