|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.jms.MessageProducerSession com.atomikos.jms.QueueSenderSession
public class QueueSenderSession
This is a long-lived queue sender session, representing a self-refreshing JMS session that can be used to send JMS messages in a transactional way. The client code does not have to worry about refreshing or closing JMS objects explicitly: this is all handled in this class. All the client needs to do is indicate when it wants to start or stop using the session.
Note that instances are not meant for concurrent use by different threads: each thread should use a private instance instead.
Important: if you change any properties AFTER sending on the session, then you will need to explicitly stop and restart the session to have the changes take effect!
Constructor Summary | |
---|---|
QueueSenderSession()
Default constructor in JavaBean style. |
Method Summary | |
---|---|
protected String |
getDestinationName()
|
javax.jms.Queue |
getQueue()
|
QueueConnectionFactoryBean |
getQueueConnectionFactoryBean()
|
protected String |
getReplyToDestinationName()
|
javax.jms.Queue |
getReplyToQueue()
Gets the queue where replies are expected, or null if not applicable (or if the replyToDestination is not a queue but a topic). |
void |
setQueue(javax.jms.Queue queue)
Set the queue to use for sending (required). |
void |
setQueueConnectionFactoryBean(QueueConnectionFactoryBean bean)
Set the queue connection factory, needed to create or refresh connections (required). |
void |
setReplyToQueue(javax.jms.Queue queue)
If this session is used for sending request/reply messages, then this property indicates the queue to where the replies are to be sent (optional). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueueSenderSession()
Method Detail |
---|
public void setReplyToQueue(javax.jms.Queue queue)
The replyToQueue should be in the same JMS vendor domain as the send queue. To cross domains, configure a bridge for both the request and the reply channels.
queue
- The queue where a reply should go.public javax.jms.Queue getReplyToQueue()
public javax.jms.Queue getQueue()
public QueueConnectionFactoryBean getQueueConnectionFactoryBean()
public void setQueue(javax.jms.Queue queue)
queue
- The queue.public void setQueueConnectionFactoryBean(QueueConnectionFactoryBean bean)
bean
- protected String getDestinationName()
getDestinationName
in class MessageProducerSession
protected String getReplyToDestinationName()
getReplyToDestinationName
in class MessageProducerSession
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |