Introduction to JMS

The JMS specification defines an API for building enterprise messaging middleware systems that give Java developers a generic way to create, send, and receive messages. JMS supports portable, message-based business applications. JMS is also the foundation for MDB.

JRun provides seamless integration of full JMS support, with a built-in JMS provider, as well as support for external JMS providers, such as SonicMQ.

This chapter describes how to use the JMS services provided with JRun. Knowledge of JMS is assumed. For complete information on JMS, see the JMS specification available at http://java.sun.com.

Types of messaging

The JRun JMS implementation fully supports the Sun JMS specification version 1.02b for both point-to-point (queue-based) and publish/subscribe (topic-based) synchronous and asynchronous messaging. You can specify messages as persistent, thus ensuring that they are not lost in a server shutdown.

Durable subscriptions are available with topic-based messaging. This ensures that a client will receive all messages that are generated, including any messages that are generated while the subscriber is inactive.

Terminology

This chapter uses the term producer to describe the client that sends a message. It uses the term consumer to describe the client that receives a message. Consumers and producers are both referred to as clients.

With point-to-point messaging, producers are referred to as senders, and consumers as receivers. With publish/subscribe messaging, producers are referred to as publishers, and consumers as subscribers.

To produce or consume messages, a client establishes a connection to the server and then calls the connection to create a session. The client communicates with the server, producing or consuming messages using the previously established Session object. Point-to-point messaging and publish/subscribe use customized descendants of the Connection and Session objects.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/jrun/4/Programmers_Guide/introjms2.htm