org.springframework.orm.hibernate4
Class SessionHolder
java.lang.Object
org.springframework.transaction.support.ResourceHolderSupport
org.springframework.orm.hibernate4.SessionHolder
- All Implemented Interfaces:
- org.springframework.transaction.support.ResourceHolder
public class SessionHolder
- extends org.springframework.transaction.support.ResourceHolderSupport
Session holder, wrapping a Hibernate Session and a Hibernate Transaction.
HibernateTransactionManager binds instances of this class to the thread,
for a given SessionFactory.
Note: This is an SPI class, not intended to be used by applications.
- Since:
- 3.1
- Author:
- Juergen Hoeller
- See Also:
HibernateTransactionManager
,
SessionFactoryUtils
Methods inherited from class org.springframework.transaction.support.ResourceHolderSupport |
getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, isVoid, released, requested, reset, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds, unbound |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SessionHolder
public SessionHolder(org.hibernate.Session session)
getSession
public org.hibernate.Session getSession()
setTransaction
public void setTransaction(org.hibernate.Transaction transaction)
getTransaction
public org.hibernate.Transaction getTransaction()
setPreviousFlushMode
public void setPreviousFlushMode(org.hibernate.FlushMode previousFlushMode)
getPreviousFlushMode
public org.hibernate.FlushMode getPreviousFlushMode()
clear
public void clear()
- Overrides:
clear
in class org.springframework.transaction.support.ResourceHolderSupport