JMS Session Builder
In this topic ...
Related Topics ...
The JMS Session, in conjunction with the the JMS Message Builder builder enables the Factory to act as a JMS client with which we can establish a logical connection to a JMS provider. We can then use a JMS Message builder call to send or publish messages to the JMS provider's destination Topics or Queues, respectively.
Before you use the JMS Session and JMS Message builders, we need to have JMS working either on the local application server or on a remote server.
The JMS Session builder allows you to specify configuration information to connect to a JMS Queue or Topic. You can use multiple JMS Session builder calls in a model to route messages to particular Topics or Queues. Also, multiple JMS Message builder calls can use the same JMS Session builder call, which allows you to define the JMS connection once for any number of messages being routed to a particular Topic or Queue.
For more information about JMS, see the specification from Sun and the documentation for your application server.
Specifying Inputs
The JMS Session builder takes the inputs described in the table below. For help on inputs common to many or all builders such as those in the Properties and HTML Attributes input groups, see "Using the Builder Call Editor."
Input name Description Name Enter a name for this builder call. The designer tool displays this name in the builder call list. JMS Destination Type Messaging model (Queue or Topic) used by the specified JMS Destination.
- Queue -- Routes messages to a JMS Queue, supporting point-to-point communication.
- Topic -- Routes messages to a JMS Topic, supporting publish/subscribe communication.
JMS Connection Factory JMS Connection Factory name, as registered in JNDI on the server. JMS Destination Name JNDI Name of JMS Destination, as defined on the server, for which to create a session. Remote JNDI Server Options (only apply to JNDI on a remote machine) JNDI Context Factory Specify the name of the JNDI Context Factory class associated with the remote server. JNDI URL Specify the JNDI URL for a remote JNDI server. (optional) Principal Username with which to authenticate to the JNDI server with, if required. Application servers handle this input in different ways. For example:
On WebSphere - The Principal and credentials inputs you provide in this builder will override the ones provided by the datasource on the application server.
(optional) Credentials Credentials (password) with which to authenticate to the JNDI server with, if required. Advanced JMS Options Delivery Mode Default delivery mode for messages associated with this JMS Session.
- Persistent -- Provides for message recovery in the event that the JMS provider fails.
- Non-persistent -- Does not provide for any JMS failover functionality.
Message Priority Default message priority for messages associated with this JMS Session. Message Expiration Default message expiration in milliseconds, where 0 = no expiration, for messages associated with this JMS Session. Connection Username Username with which to create connection from JMS ConnectionFactory. See JMS API documentation for QueueConnectionFactory and TopicConnectionFactory for more details. Connection Password Password with which to create connection from JMS ConnectionFactory. See JMS API documentation for QueueConnectionFactory and TopicConnectionFactory for more details.