|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.transaction.support.ResourceHolderSupport org.springframework.jms.connection.JmsResourceHolder
public class JmsResourceHolder
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.
JmsTransactionManager
,
JmsTemplate
Constructor Summary | |
---|---|
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(ConnectionFactory connectionFactory,
Connection connection,
Session session)
Create a new JmsResourceHolder for the given JMS resources. |
|
JmsResourceHolder(Connection connection,
Session session)
Create a new JmsResourceHolder for the given JMS resources. |
Method Summary | |
---|---|
void |
addConnection(Connection connection)
|
void |
addSession(Session session)
|
void |
addSession(Session session,
Connection connection)
|
void |
closeAll()
|
void |
commitAll()
|
boolean |
containsSession(Session session)
|
Connection |
getConnection()
|
Connection |
getConnection(Class connectionType)
|
Session |
getSession()
|
Session |
getSession(Class sessionType)
|
Session |
getSession(Class sessionType,
Connection connection)
|
boolean |
isFrozen()
|
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 |
Constructor Detail |
---|
public JmsResourceHolder()
public JmsResourceHolder(ConnectionFactory connectionFactory)
connectionFactory
- the JMS ConnectionFactory that this
resource holder is associated with (may be null
)public JmsResourceHolder(Connection connection, Session session)
connection
- the JMS Connectionsession
- the JMS Sessionpublic JmsResourceHolder(ConnectionFactory connectionFactory, Connection connection, Session session)
connectionFactory
- the JMS ConnectionFactory that this
resource holder is associated with (may be null
)connection
- the JMS Connectionsession
- the JMS SessionMethod Detail |
---|
public final boolean isFrozen()
public final void addConnection(Connection connection)
public final void addSession(Session session)
public final void addSession(Session session, Connection connection)
public boolean containsSession(Session session)
public Connection getConnection()
public Connection getConnection(Class connectionType)
public Session getSession()
public Session getSession(Class sessionType)
public Session getSession(Class sessionType, Connection connection)
public void commitAll() throws JMSException
JMSException
public void closeAll()
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |