com.interface21.orm.hibernate
Class SessionHolder

java.lang.Object
  |
  +--com.interface21.orm.hibernate.SessionHolder

public class SessionHolder
extends java.lang.Object

Session holder, wrapping a Hibernate Session and a Hibernate Transaction. Features rollback-only support for nested Hibernate transactions.

HibernateTransactionManager binds instances of this class to the thread, for a given SessionFactory.

Since:
06.05.2003
Author:
Juergen Hoeller
See Also:
HibernateTransactionManager, HibernateTransactionObject, SessionFactoryUtils

Constructor Summary
SessionHolder(net.sf.hibernate.Session session)
           
 
Method Summary
 net.sf.hibernate.Session getSession()
           
 net.sf.hibernate.Transaction getTransaction()
           
 boolean isRollbackOnly()
           
 void setRollbackOnly()
           
protected  void setTransaction(net.sf.hibernate.Transaction transaction)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionHolder

public SessionHolder(net.sf.hibernate.Session session)
Method Detail

getSession

public net.sf.hibernate.Session getSession()

setTransaction

protected void setTransaction(net.sf.hibernate.Transaction transaction)

getTransaction

public net.sf.hibernate.Transaction getTransaction()

setRollbackOnly

public void setRollbackOnly()

isRollbackOnly

public boolean isRollbackOnly()


Rod Johnson and Spring contributors 2001-2003.