|
|||||||||
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
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.
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. |
|
JmsResourceHolder(Session session)
Create a new JmsResourceHolder for the given JMS Session. |
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<? extends Connection> connectionType)
|
Session |
getSession()
|
Session |
getSession(Class<? extends Session> sessionType)
|
Session |
getSession(Class<? extends Session> sessionType,
Connection connection)
|
boolean |
isFrozen()
|
Methods inherited from class org.springframework.transaction.support.ResourceHolderSupport |
---|
clear, getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, isVoid, released, requested, reset, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds, unbound |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JmsResourceHolder()
addConnection(javax.jms.Connection)
,
addSession(javax.jms.Session)
public JmsResourceHolder(ConnectionFactory connectionFactory)
connectionFactory
- the JMS ConnectionFactory that this
resource holder is associated with (may be null
)public JmsResourceHolder(Session session)
session
- the JMS Sessionpublic 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<? extends Connection> connectionType)
public Session getSession()
public Session getSession(Class<? extends Session> sessionType)
public Session getSession(Class<? extends Session> sessionType, Connection connection)
public void commitAll() throws JMSException
JMSException
public void closeAll()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |