org.springframework.orm.hibernate
Class SessionHolder
java.lang.Object
org.springframework.transaction.support.ResourceHolderSupport
org.springframework.orm.hibernate.SessionHolder
- public class SessionHolder
- extends 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:
- 06.05.2003
- Author:
- Juergen Hoeller
- See Also:
HibernateTransactionManager
,
HibernateTransactionObject
,
SessionFactoryUtils
Constructor Summary |
SessionHolder(java.lang.Object key,
net.sf.hibernate.Session session)
|
SessionHolder(net.sf.hibernate.Session session)
|
Methods inherited from class org.springframework.transaction.support.ResourceHolderSupport |
clear, getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isRollbackOnly, isSynchronizedWithTransaction, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SessionHolder
public SessionHolder(net.sf.hibernate.Session session)
SessionHolder
public SessionHolder(java.lang.Object key,
net.sf.hibernate.Session session)
getSession
public net.sf.hibernate.Session getSession()
getSession
public net.sf.hibernate.Session getSession(java.lang.Object key)
getAnySession
public net.sf.hibernate.Session getAnySession()
addSession
public void addSession(java.lang.Object key,
net.sf.hibernate.Session session)
removeSession
public net.sf.hibernate.Session removeSession(java.lang.Object key)
containsSession
public boolean containsSession(net.sf.hibernate.Session session)
isEmpty
public boolean isEmpty()
setTransaction
public void setTransaction(net.sf.hibernate.Transaction transaction)
getTransaction
public net.sf.hibernate.Transaction getTransaction()
Copyright (C) 2003-2004 The Spring Framework Project.