Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atomikos.jms
Class TopicPublisherSession

    java.lang.Object
      com.atomikos.jms.MessageProducerSession
          com.atomikos.jms.TopicPublisherSession

    public class TopicPublisherSession

extends MessageProducerSession

This is a long-lived topic 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!

Topic functionality in this product was sponsored by Webtide.

Constructor Summary
`TopicPublisherSession()`

Method Summary
`protected String` | `getDestinationName()`
`protected String` | `getReplyToDestinationName()`
`javax.jms.Topic` | `getReplyToTopic()` Gets the topic to reply to.
`javax.jms.Topic` | `getTopic()` Gets the topic to send to.
`TopicConnectionFactoryBean` | `getTopicConnectionFactoryBean()` Gets the connection factory.
`void` | `setReplyToTopic(javax.jms.Topic topic)` Sets the topic to reply to (optional).
`void` | `setTopic(javax.jms.Topic topic)` Sets the topic to send to (required).
`void` | `setTopicConnectionFactoryBean(TopicConnectionFactoryBean bean)` Sets the connection factory to use (required).

Methods inherited from class com.atomikos.jms.MessageProducerSession
`createBytesMessage, createMapMessage, createObjectMessage, createStreamMessage, createTextMessage, getAbstractConnectionFactoryBean, getDeliveryMode, getDestination, getPriority, getReplyToDestination, getTimeToLive, getUser, init, sendMessage, setAbstractConnectionFactoryBean, setDeliveryMode, setDestination, setPassword, setPriority, setReplyToDestination, setTimeToLive, setUser, stop`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TopicPublisherSession

    public TopicPublisherSession()

Method Detail

### getTopic

    public javax.jms.Topic getTopic()

  Gets the topic to send to.

  Returns:

### setTopic

    public void setTopic(javax.jms.Topic topic)

  Sets the topic to send to (required).

  Parameters:
    `topic` -

### setReplyToTopic

    public void setReplyToTopic(javax.jms.Topic topic)

  Sets the topic to reply to (optional).

  Parameters:
    `topic` -

### getReplyToTopic

    public javax.jms.Topic getReplyToTopic()

  Gets the topic to reply to.

  Returns:
    Null if no reply topic was set, or if the replyTo destination is not a topic but a queue.

### setTopicConnectionFactoryBean

    public void setTopicConnectionFactoryBean(TopicConnectionFactoryBean bean)

  Sets the connection factory to use (required). This is needed to create or refresh connections for sending.

  Parameters:
    `bean` -

### getTopicConnectionFactoryBean

    public TopicConnectionFactoryBean getTopicConnectionFactoryBean()

  Gets the connection factory.

  Returns:

### getDestinationName

    protected String getDestinationName()

  Specified by:
    `getDestinationName` in class `MessageProducerSession`

### getReplyToDestinationName

    protected String getReplyToDestinationName()

  Specified by:
    `getReplyToDestinationName` in class `MessageProducerSession`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.