org.springframework.orm.hibernate
Class SessionHolder

java.lang.Object
  extended byorg.springframework.transaction.support.ResourceHolderSupport
      extended byorg.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(net.sf.hibernate.Session session)
           
 
Method Summary
 net.sf.hibernate.Session getSession()
           
 net.sf.hibernate.Transaction getTransaction()
           
 boolean isSynchronizedWithTransaction()
           
 void setSynchronizedWithTransaction(boolean synchronizedWithTransaction)
           
 void setTransaction(net.sf.hibernate.Transaction transaction)
           
 
Methods inherited from class org.springframework.transaction.support.ResourceHolderSupport
getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, isRollbackOnly, setRollbackOnly, setTimeoutInMillis, setTimeoutInSeconds
 
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

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

getTransaction

public net.sf.hibernate.Transaction getTransaction()

setSynchronizedWithTransaction

public void setSynchronizedWithTransaction(boolean synchronizedWithTransaction)

isSynchronizedWithTransaction

public boolean isSynchronizedWithTransaction()


Copyright (C) 2003-2004 The Spring Framework Project.