Asynchronous Messaging


JMS (http://java.sun.com/products/jms/docs.html) provides the ability for an application to send messages to another application without waiting for a reply. There are two forms of message delivery that are supported:

  • Point to Point using message queues
    Allows a peer to peer form of communication in which two parties agree to provide the roles of message producer and message consumer, as shown in the figure below:

    click to expand

  • Publish/Subscribe using message topics
    Allows for a one many communications pattern, shown in the figure below, where a message producer places messages into a topic based on its topic name. Consumers that are interested in that topic can then subscribe to be notified when a message for that topic has arrived:

    click to expand

The following sections describe WebSphere's support of messaging followed by an extension of the PlantsByWebSphere application to support order processing using messaging.

WebSphere Messaging Engines

WebSphere provides support for a number of different messaging engines for use within the various WebSphere products. They are:

  • LightWeight JMS

  • Embedded JMS

  • External JMS/MQ

These three messaging engines cover different needs and are discussed in more detail below.

Lightweight JMS

The WebSphere Lightweight JMS engine provides messaging support for development tools – WebSphere Studio Application Developer (WSAD) in particular – for rapid iterative development use. WSAD uses the lightweight JMS engine to provide messaging support within the unit test environment. However, this does not imply that WSAD cannot be used with the other messaging engines. It can be configured to use any of the three JMS engines. See the Configuring the Test Environment section for details on setting up connection factories.

The Lightweight JMS engine provides a close approximation to the J2EE-required JMS functionality; but trades off support for security, persistence, and recoverability, for a quicker startup time. Both point to point and publish/subscribe messaging are supported. It will accept durable subscriptions and persistent messages, but they will not be persisted across a server restart. The lightweight JMS engine will also support transactional semantics, but the transaction will not be logged or recoverable across server restart.

The Lightweight JMS provider is designed to be an in process JMS engine and will not interoperate with the other WebSphere JMS engines. It is installed as part of the WSAD installation.

Embedded JMS

The embedded JMS engine provides a subset of the WebSphere MQ 5.3 and WebSphere MQ Event Broker 2.1 functionality. It is a fully J2EE-compliant messaging engine. JMS provider management is integrated with WebSphere Systems Management. The message engine server is automatically started and stopped as part of the server configuration. Topics and queues can be created as part of the JMS resource configuration. The embedded JMS provider can only be installed if WebSphere MQ is not already installed on the node.

External JMS/MQ

The external JMS engine provides complete functionality for JMS messaging including message queue clustering support. There can only be one WebSphere MQ JMS provider, embedded or external, installed on a node. If WebSphere MQ is installed before the WebSphere Application Server, the external WebSphere MQ already installed will be used. If WebSphere MQ is not installed before WebSphere is installed, the embedded JMS will be installed and can be upgraded to use the full external WebSphere MQ by installing it after WebSphere Application Server is installed.

The WebSphere product family provides additional messaging support in the form of WebSphere MQ Integrator Broker, which provides rule based message transformation and routing that can be visually composed into message flows.

Other Supported Messaging Providers

In general, WebSphere supports the use of MQ based JMS providers. Other JMS providers can be used from a client point of view for non managed connections to a JMS provider, but they cannot replace the functions provided by the WebSphere messaging engines. These non managed connections are obtained using the same programming model as WebSphere MQ-based JMS connections, but they are not integrated to provide connection pooling behavior.

WAS expects a JMS provider to have implemented the Application Server Facilities (ASF) of the JMS specification to fully integrate with the runtime (for example, to drive work on message driven beans). Many JMS providers do not implement this part of the specification.




Professional IBM WebSphere 5. 0 Applicationa Server
Professional IBM WebSphere 5. 0 Applicationa Server
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 135

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net