Java Message Service API

The JMS API is a Message-Oriented Middleware (MOM) API. It was designed by a collaboration of several companies, including Sun Microsystems and IBM. Version 1 of the API was released in August, 1998. The purpose of JMS is to enable applications to transmit and receive messages in an asynchronous and reliable way. The JMS API also defines interfaces to allow applications written using JMS to communicate with other messaging APIs.

The JMS designers' aims were as follows:

  • To minimize the messaging concepts that a programmer needs to understand

  • Provide communication that is loosely coupled, asynchronous, and reliable

  • Have a consistent API that is independent of the JMS provider

  • Maximize the portability of JMS applications

The JMS API provides messaging that is

  • Loosely coupled— The sender and receiver may have no information about each other or the mechanisms used to process messages.

  • Asynchronous— Receivers do not request messages. Messages can be delivered as they arrive. The sender does not wait for reply.

  • Reliable— A message is sent and received once and only once.

Note the JMS API does not specify how to control the privacy and integrity of messages. The type and level of message security is left to the JMS providers and is configured by administers not by J2EE clients.

JMS and J2EE

Prior to J2EE 1.3, it was not necessary to implement the JMS API. From version 1.3, the JMS API became an integral part of the J2EE requirements.

Support for JMS within the J2EE platform provides the following functionality and features:

  • Message beans for the sending and receiving of asynchronous messages (message beans are covered on Day 10)

  • Support for distributed transactions

  • Concurrent consumption of messages

An additional goal is to provide loosely coupled, reliable, asynchronous communication with legacy systems.

Programmatically, JMS can be considered to be a container-managed resource, similar to a JDBC connection. Application clients, EJBs, and Web components can all utilize the JMS API to send and receive messages. Note, however, that Applets are not required to support JMS.

The addition of the JMS API to J2EE simplifies enterprise software development and provides access to existing Enterprise Information Systems (EIS) and other legacy systems.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.20.68