Class Overview
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.
Summary
[Expand]
Inherited Methods |
From class
org.springframework.transaction.support.ResourceHolderSupport
void
|
clear()
Clear the transactional state of this resource holder.
|
Date
|
getDeadline()
Return the expiration deadline of this object.
|
long
|
getTimeToLiveInMillis()
Return the time to live for this object in milliseconds.
|
int
|
getTimeToLiveInSeconds()
Return the time to live for this object in seconds.
|
boolean
|
hasTimeout()
Return whether this object has an associated timeout.
|
boolean
|
isOpen()
Return whether there are still open references to this holder.
|
boolean
|
isRollbackOnly()
Return whether the resource transaction is marked as rollback-only.
|
boolean
|
isSynchronizedWithTransaction()
Return whether the resource is synchronized with a transaction.
|
boolean
|
isVoid()
Determine whether this holder is considere as 'void',
i.e.
|
void
|
released()
Decrease the reference count by one because the holder has been released
(i.e.
|
void
|
requested()
Increase the reference count by one because the holder has been requested
(i.e.
|
void
|
reset()
Reset this resource holder - transactional state as well as reference count.
|
void
|
setRollbackOnly()
Mark the resource transaction as rollback-only.
|
void
|
setSynchronizedWithTransaction(boolean synchronizedWithTransaction)
Mark the resource as synchronized with a transaction.
|
void
|
setTimeoutInMillis(long millis)
Set the timeout for this object in milliseconds.
|
void
|
setTimeoutInSeconds(int seconds)
Set the timeout for this object in seconds.
|
void
|
unbound()
Notify this holder that it has been unbound from transaction synchronization.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.transaction.support.ResourceHolder
abstract
boolean
|
isVoid()
Determine whether this holder is considere as 'void',
i.e.
|
abstract
void
|
reset()
Reset the transactional state of this holder.
|
abstract
void
|
unbound()
Notify this holder that it has been unbound from transaction synchronization.
|
|
Public Constructors
public
SessionHolder
(Session session)
public
SessionHolder
(Object key, Session session)
Public Methods
public
void
addSession
(Object key, Session session)
public
void
addSession
(Session session)
public
void
clear
()
Clear the transactional state of this resource holder.
public
boolean
containsSession
(Session session)
public
boolean
doesNotHoldNonDefaultSession
()
public
Session
getAnySession
()
public
FlushMode
getPreviousFlushMode
()
public
Session
getSession
(Object key)
public
Session
getSession
()
public
Transaction
getTransaction
()
public
Session
getValidatedSession
(Object key)
public
Session
getValidatedSession
()
public
boolean
isEmpty
()
public
Session
removeSession
(Object key)
public
void
setPreviousFlushMode
(FlushMode previousFlushMode)
public
void
setTransaction
(Transaction transaction)