|
|||||||||
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
Field Summary | |
---|---|
private ConnectionFactory |
connectionFactory
|
private java.util.List<Connection> |
connections
|
private boolean |
frozen
|
private static Log |
logger
|
private java.util.List<Session> |
sessions
|
private java.util.Map<Connection,java.util.List<Session>> |
sessionsPerConnection
|
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(java.lang.Class<? extends Connection> connectionType)
|
Session |
getSession()
|
Session |
getSession(java.lang.Class<? extends Session> sessionType)
|
Session |
getSession(java.lang.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 |
Field Detail |
---|
private static final Log logger
private ConnectionFactory connectionFactory
private boolean frozen
private final java.util.List<Connection> connections
private final java.util.List<Session> sessions
private final java.util.Map<Connection,java.util.List<Session>> sessionsPerConnection
Constructor Detail |
---|
public JmsResourceHolder()
addConnection(Connection)
,
addSession(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(java.lang.Class<? extends Connection> connectionType)
public Session getSession()
public Session getSession(java.lang.Class<? extends Session> sessionType)
public Session getSession(java.lang.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 |