org.springframework.jms.connection
Class JmsResourceHolder
java.lang.Object
org.springframework.transaction.support.ResourceHolderSupport
org.springframework.jms.connection.JmsResourceHolder
public class JmsResourceHolder
- extends ResourceHolderSupport
Connection 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.
- Since:
- 1.1
- Author:
- Juergen Hoeller
- See Also:
JmsTransactionManager
,
JmsTemplate
Methods inherited from class org.springframework.transaction.support.ResourceHolderSupport |
clear, getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, released, requested, reset, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JmsResourceHolder
public JmsResourceHolder()
- Create a new JmsResourceHolder that is open for resources to be added.
- See Also:
addConnection(javax.jms.Connection)
,
addSession(javax.jms.Session)
JmsResourceHolder
public JmsResourceHolder(Connection connection,
Session session)
- Create a new JmsResourceHolder for the given JMS resources.
- Parameters:
connection
- the JMS Connectionsession
- the JMS Session
isFrozen
public final boolean isFrozen()
addConnection
public final void addConnection(Connection connection)
addSession
public final void addSession(Session session)
addSession
public final void addSession(Session session,
Connection connection)
getConnection
public Connection getConnection()
getConnection
public Connection getConnection(Class connectionType)
getSession
public Session getSession()
getSession
public Session getSession(Class sessionType)
getSession
public Session getSession(Class sessionType,
Connection connection)
commitAll
public void commitAll()
throws JMSException
- Throws:
JMSException
closeAll
public void closeAll()
Copyright © 2002-2007 The Spring Framework.