Sunday, February 1, 2009

Service Integration Bus

· JMS clients are the programs or components, written in the JavaTM programming language,
that produce and consume messages.
· Messages are the objects that communicate information between JMS clients.
· Administered objects are preconfigured JMS objects created by an administrator for the use of
· Administrative tools allow you to bind destinations and connection factories into a Java
Naming and Directory InterfaceTM (JNDI) API namespace. A JMS client can then look up the
administered objects in the namespace and then establish a logical connection to the same
objects through the JMS provider. clients. The two kinds of administered objects are
destinations and connection factories
















Point-to-Point Messaging Domain:

A point-to-point (PTP) product or application is built around the concept of message queues, senders, and receivers. Each message is addressed to a specific queue, and receiving clients extract messages from the queue(s) established to hold their messages. Queues retain all messages sent to them until the messages are consumed or until the messages expire















Publish/Subscribe Messaging Domain:

In a publish/subscribe (pub/sub) product or application, clients address messages to a topic. Publishers and subscribers are generally anonymous and may dynamically publish or subscribe to the content hierarchy. The system takes care of distributing the messages arriving from a topic's multiple publishers to its multiple subscribers. Topics retain messages only as long as it takes to distribute them to current subscribers.



































connection factory:
A connection factory is the object a client uses to create a connection with a provider.

Destination:
A destination is the object a client uses to specify the target of messages it produces and the source of messages it consumes. In the PTP messaging domain, destinations are called queues,

Session:
A session is a single-threaded context for producing and consuming messages. You use sessions to create message producers, message consumers, and messages. Sessions serialize the execution of message listeners;

Message producer
A message producer is an object created by a session and is used for sending messages to a destination. The PTP form of a message producer implements the QueueSender interface. The pub/sub form implements the TopicPublisher interface.


Message consumer:
A message consumer is an object created by a session and is used for receiving messages sent to a destination. A message consumer allows a JMS client to register interest in a destination with a JMS provider. The JMS provider manages the delivery of messages from a destination to the registered consumers of the destination.
The PTP form of message consumer implements the QueueReceiver interface. The pub/sub form implements the TopicSubscriber interface.


Message listener:
A message listener is an object that acts as an asynchronous event handler for messages. This object implements the MessageListener interface, which contains one method, onMessage. In the onMessage method, you define the actions to be taken when a message arrives.
You register the message listener with a specific QueueReceiver or TopicSubscriber by using the setMessageListener method. For example, if you define a class named TopicListener that implements the MessageListener interface,


Messages:
The ultimate purpose of a JMS application is to produce and to consume messages that can then be used by other software applications. JMS messages have a basic format that is simple but highly flexible, allowing you to create messages that match formats used by non-JMS applications on heterogeneous platforms.

A JMS message has three parts:
· A header
· Properties (optional)
· A body (optional)

Message Headers:
A JMS message header contains a number of predefined fields that contain values that both clients and providers use to identify and to route messages. (Table: lists the JMS message header fields and indicates how their values are set.) For example, every message has a unique identifier, represented in the header field JMSMessageID. The value of another header field, JMSDestination, represents the queue or the topic to which the message is sent. Other fields include a timestamp and a priority level.






















Message Bodies:
The JMS API defines five message body formats, also called message types, which allow you to send and to receive data in many different forms and provide compatibility with existing messaging formats.