Class Overview
JMS resource holder, wrapping a JMS Connection and a JMS Session.
JmsTransactionManager binds instances of this class to the thread,
for a given JMS ConnectionFactory.
Note: This is an SPI class, not intended to be used by applications.
Summary
Public Constructors |
|
JmsResourceHolder()
Create a new JmsResourceHolder that is open for resources to be added.
|
|
JmsResourceHolder(ConnectionFactory connectionFactory)
Create a new JmsResourceHolder that is open for resources to be added.
|
|
JmsResourceHolder(Session session)
Create a new JmsResourceHolder for the given JMS Session.
|
|
JmsResourceHolder(Connection connection, Session session)
Create a new JmsResourceHolder for the given JMS resources.
|
|
JmsResourceHolder(ConnectionFactory connectionFactory, Connection connection, Session session)
Create a new JmsResourceHolder for the given JMS resources.
|
[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
JmsResourceHolder
()
Create a new JmsResourceHolder that is open for resources to be added.
public
JmsResourceHolder
(ConnectionFactory connectionFactory)
Create a new JmsResourceHolder that is open for resources to be added.
Parameters
connectionFactory
| the JMS ConnectionFactory that this
resource holder is associated with (may be null )
|
public
JmsResourceHolder
(Session session)
Create a new JmsResourceHolder for the given JMS Session.
public
JmsResourceHolder
(Connection connection, Session session)
Create a new JmsResourceHolder for the given JMS resources.
Parameters
connection
| the JMS Connection |
session
| the JMS Session
|
public
JmsResourceHolder
(ConnectionFactory connectionFactory, Connection connection, Session session)
Create a new JmsResourceHolder for the given JMS resources.
Parameters
connectionFactory
| the JMS ConnectionFactory that this
resource holder is associated with (may be null ) |
connection
| the JMS Connection |
session
| the JMS Session
|
Public Methods
public
final
void
addConnection
(Connection connection)
public
final
void
addSession
(Session session, Connection connection)
public
final
void
addSession
(Session session)
public
boolean
containsSession
(Session session)
public
Connection
getConnection
()
public
Connection
getConnection
(Class<? extends Connection> connectionType)
public
Session
getSession
(Class<? extends Session> sessionType, Connection connection)
public
Session
getSession
()
public
Session
getSession
(Class<? extends Session> sessionType)
public
final
boolean
isFrozen
()