Reference › Test Case Reference › Asset Descriptions › JMS Client Assets
JMS Client Assets
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.
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.
Many 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.
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.
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.
Producers
A producer is used to send a message to a destination.
DevTest has only one type of producer.
Consumers
A consumer is used to receive a message from a destination.
DevTest has only one type of consumer. However, you can use a consumer 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.
Copyright © 2014 CA Technologies.
All rights reserved.
|
|