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 TypeMethodDescriptionvoid
abort()
Aborts the current transaction, and starts a new transaction to replace it.void
commit()
Commits the current transaction (which will cause a flush of data to the database), then starts a new transaction to replace it.org.hibernate.Session
Gets the active session for this request, creating it as necessary.void
Rollsback the transaction at the end of the request, then closes the session.
-
Constructor Details
-
HibernateSessionManagerImpl
-
-
Method Details
-
abort
Description copied from interface:HibernateSessionManager
Aborts the current transaction, and starts a new transaction to replace it.- Specified by:
abort
in interfaceHibernateSessionManager
-
commit
Description copied from interface:HibernateSessionManager
Commits the current transaction (which will cause a flush of data to the database), then starts a new transaction to replace it.- Specified by:
commit
in interfaceHibernateSessionManager
-
getSession
Description copied from interface:HibernateSessionManager
Gets the active session for this request, creating it as necessary. When the session is first created, a transaction is started.- Specified by:
getSession
in 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:
threadDidCleanup
in interfaceThreadCleanupListener
-