Skip to content
DevTest Solutions - 10.1
Documentation powered by DocOps

JMS Client Assets

Last update April 29, 2016

The Java Message Service (JMS) is a specification that allows Java programs to interact with enterprise messaging systems. The original version is 1.0. The latest version is 1.1.

JMS includes the following terminology:

  • JMS client
    A Java program that uses JMS to communicate with a messaging system.
  • JMS provider
    A messaging system that implements JMS.

You can create assets for the following types of objects that the JMS clients use:

  • Connection factory
  • Connection
  • Session
  • Producer
  • Consumer
  • Destination

In the editor for each JMS client asset, each parameter has a tooltip that describes the purpose of the parameter.

The following graphic shows how a JMS client handles request messages and response messages.

JMS client and objects diagram

Connection Factories

A connection factory is used to create connections.

The connection factories can be characterized in terms of how they are initialized:

  • Generic connection factory
    Initialized by using the Java Naming and Directory Interface (JNDI).
  • Direct connection factory
    Initialized in a way that is specific to a JMS provider. This type of connection factory has its own, often large, set of parameters.

The connection factories can also be characterized in terms of the destinations that they support:

  • Queue connection factory
    Supports queues only. This type is from JMS version 1.0.
  • Topic connection factory
    Supports topics only. This type is from JMS version 1.0.
  • Connection factory
    If a connection factory is not specified as either of the preceding types, then it supports both queues and topics.

Most connection factory assets are a combination of these two categories. For example, the Direct JMS 1.0 Topic Connection Factory for TIBCO EMS asset is a direct connection factory that supports topics only.

The following connection factory assets are available:

  • JMS Generic Connection Factory
  • JMS 1.0 Generic Queue Connection Factory
  • JMS 1.0 Generic Topic Connection Factory
  • Direct JMS Connection Factory for ActiveMQ
  • Direct JMS Connection Factory for IBM MQ
  • Direct JMS 1.0 Queue Connection Factory for IBM MQ
  • Direct JMS 1.0 Topic Connection Factory for IBM MQ
  • Direct JMS Connection Factory for JCAPS
  • Direct JMS 1.0 Queue Connection Factory for JCAPS
  • Direct JMS 1.0 Topic Connection Factory for JCAPS
  • Direct JMS Connection Factory for SonicMQ
  • Direct JMS 1.0 Queue Connection Factory for SonicMQ
  • Direct JMS 1.0 Topic Connection Factory for SonicMQ
  • Direct JMS Connection Factory for TIBCO EMS
  • Direct JMS 1.0 Queue Connection Factory for TIBCO EMS
  • Direct JMS 1.0 Topic Connection Factory for TIBCO EMS

Notice that ActiveMQ has one version of the connection factory asset, instead of three versions.

Connections

A connection represents an active connection with a JMS provider. Connections are used to create sessions.

Connections can be characterized in terms of the destinations that they support:

  • Queue connection
    Supports queues only. This type is from JMS version 1.0.
  • Topic connection
    Supports topics only. This type is from JMS version 1.0.
  • Connection
    If a connection is not specified as either of the preceding types, then it supports both queues and topics.

A connection must remain open while its sessions are open.

The following connection assets are available:

  • JMS Connection
  • JMS 1.0 Queue Connection
  • JMS 1.0 Topic Connection
  • TIBCO Admin Connection

Sessions

A session is used to create producers and consumers.

Sessions can be characterized in terms of the destinations that they support:

  • Queue session
    Supports queues only. This type is from JMS version 1.0.
  • Topic session
    Supports topics only. This type is from JMS version 1.0.
  • Session
    If a session is not specified as either of the preceding types, then it supports both queues and topics.

A session must remain open while its producers and consumers are active.

The following session assets are available:

  • JMS Session
  • JMS 1.0 Queue Session
  • JMS 1.0 Topic Session

Producers

A producer is used to send a message to a destination.

One producer asset is available: JMS Producer.

Consumers

A consumer is used to receive a message from a destination.

One consumer asset is available: JMS Consumer. However, you can use the asset in either of two ways:

  • Synchronously
    While a client is waiting to receive a message, the client cannot do anything else.
  • Asynchronously
    While a client is waiting to receive a message, the client can perform other tasks.

Destinations

A destination represents a location on the JMS platform where messages are placed.

Destinations are divided into queues and topics:

  • Queue
    A destination that supports the point-to-point messaging model. When a message is sent to a queue, only one receiver can receive the message.
  • Topic
    A destination that supports the publish/subscribe messaging model. When a message is sent to a topic, multiple receivers can receive the message.

Destinations can also be characterized in terms of how they are created:

  • JNDI destination
    Initialized by using the Java Naming and Directory Interface (JNDI).
  • Temp JNDI destination
    A JMS session can be used to create a destination temporarily. This destination exists as long as the session is open, and is deleted when the session is closed.
  • Destination
    A static destination is not specified as either of the preceding types, and is obtained through the JMS session.

Destination assets are a combination of these two categories. For example, the JMS JNDI Queue asset is a point-to-point destination that is initialized through JNDI.

The following destination assets are available:

  • JMS Queue
  • JMS JNDI Queue
  • JMS Temporary Queue
  • JMS Topic
  • JMS JNDI Topic
  • JMS Temporary Topic
Was this helpful?

Please log in to post comments.