Class SpringSessionSynchronization
java.lang.Object
org.springframework.orm.hibernate5.SpringSessionSynchronization
- All Implemented Interfaces:
Flushable,org.springframework.core.Ordered,org.springframework.transaction.support.TransactionSynchronization
public class SpringSessionSynchronization
extends Object
implements org.springframework.transaction.support.TransactionSynchronization, org.springframework.core.Ordered
Callback for resource cleanup at the end of a Spring-managed transaction
for a pre-bound Hibernate Session.
- Since:
- 4.2
- Author:
- Juergen Hoeller
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEFields inherited from interface org.springframework.transaction.support.TransactionSynchronization
STATUS_COMMITTED, STATUS_ROLLED_BACK, STATUS_UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionSpringSessionSynchronization(SessionHolder sessionHolder, SessionFactory sessionFactory) SpringSessionSynchronization(SessionHolder sessionHolder, SessionFactory sessionFactory, boolean newSession) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidafterCompletion(int status) voidbeforeCommit(boolean readOnly) voidvoidflush()intgetOrder()voidresume()voidsuspend()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.transaction.support.TransactionSynchronization
savepoint, savepointRollback
-
Constructor Details
-
SpringSessionSynchronization
-
SpringSessionSynchronization
public SpringSessionSynchronization(SessionHolder sessionHolder, SessionFactory sessionFactory, boolean newSession)
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Specified by:
getOrderin interfaceorg.springframework.transaction.support.TransactionSynchronization
-
suspend
public void suspend()- Specified by:
suspendin interfaceorg.springframework.transaction.support.TransactionSynchronization
-
resume
public void resume()- Specified by:
resumein interfaceorg.springframework.transaction.support.TransactionSynchronization
-
flush
public void flush() -
beforeCommit
public void beforeCommit(boolean readOnly) throws org.springframework.dao.DataAccessException - Specified by:
beforeCommitin interfaceorg.springframework.transaction.support.TransactionSynchronization- Throws:
org.springframework.dao.DataAccessException
-
beforeCompletion
public void beforeCompletion()- Specified by:
beforeCompletionin interfaceorg.springframework.transaction.support.TransactionSynchronization
-
afterCommit
public void afterCommit()- Specified by:
afterCommitin interfaceorg.springframework.transaction.support.TransactionSynchronization
-
afterCompletion
public void afterCompletion(int status) - Specified by:
afterCompletionin interfaceorg.springframework.transaction.support.TransactionSynchronization
-