Show TOC Start of Content Area

Component documentation Using Java Message Service  Locate the document in its SAP Library structure

Use

The Java Message Service (JMS) is an enterprise messaging system that provides a way for business applications to exchange data without needing to be directly connected to each other. The communication is obtained using messages.

More information: JMS Overview

The distribution of JMS resources among the nodes in a cluster and the way messages are transferred between nodes is called JMS clustering. There is also JMS failover, which is the process of detecting a system failure leading to unavailability of JMS resources (hosted on the failing node) and migrating these resources to a backup node.

More information: JMS Clustering and Failover

Procedure

...

       1.      (Optional) Create and configure JMS Virtual Providers.

You can optionally create and configure new JMS Virtual Providers or you can use the default one.

More information: Creating and Configuring JMS Virtual Providers

       2.      Create and configure JMS resources and resource references.

You have to create and configure JMS resources and resource references via the SAP NetWeaver Developer Studio or via SAP NetWeaver Administrator.

More information: Creating and Configuring JMS Resources and Resource References

       3.      (Optional) Use JMS resources from more than one application.

There are several ways to share JMS resources between two or more applications.

More information: Using JMS Resources from Two and More Applications

       4.      Access JMS resources.

You can use annotations to inject the JMS resources or you can access them using JNDI lookup.

More information: Accessing JMS Resources

       5.      Create a message producer and consumer.

You have to create a message producer and consumer to a queue or a topic, and afterwards you can consume messages synchronously or asynchronously, or use message-driven beans.

More information: Creating a Message Producer and Consumer

       To monitor the messages, use a queue browser.

More information: Using Queue Browsers

       If you want to be sure that you receive all messages published to a topic, no matter if the topic subscriber is active or not, use durable subscribers.

More information: Using Durable Subscriptions

       If you need to categorize different messages, use message selectors.

More information: Using Message Selectors

       If you want to consume messages asynchronously, use message-driven beans.

More information: Consuming Messages from Message-Driven Beans

       6.      Process messages.

More information: Processing Messages

       7.      (Optional) Handle dead messages.

More information: Handling Dead Messages

       8.      (Optional) Use transactions.

More information: Using Transactions

       9.      (Optional) Configure the connection factory properties in the jms-resources.xml that are related to transactions.

More information: Configuring Transaction-Related JMS Connection Factory Properties

   10.      (Optional) You can use a third-party JMS Provider.

More information: Using a Third-Party JMS Provider

   11.      (Optional) You can use the JMS Store and Forward functionality.

This allows you to deliver messages reliably between applications that are distributed across two clusters.

More information: Using JMS Store-and-Forward

   12.       (Optional) Monitor the runtime information of the JMS Provider.

More information: Monitoring JMS Provider Using Telnet

   13.      (Optional) Handle exceptions.

More information: Handling Exceptions

Features

SAP JMS Provider has the following features:

JMS Features List 

Feature

Description

JMS 1.1 Compliance

Full compliance with the JMS 1.1 specification.

One of the main new features in JMS 1.1 is the domain unification: support of client code that works simultaneously with either the point-to-point or publish/subscribe domains. Queues and topics now can be accessed through the same session and thus in the same transaction.

JCA 1.5 Adapter

Implementation of a JCA 1.5 compliant resource adapter. The JMS Resource Adapter is an Inbound Resource Adapter according to the JCA 1.5 specification. It allows plugability of the JMS providers with J2EE containers in a standardized fashion. The message-driven beans (MDBs) use the JMS provider using the resource adaptor instead of working with the provider directly. This is preferable since it hides from the MDBs the JMS specifics as a messaging services provider.

Software High Availability

Software-based high availability solution.

JTA Transactions

Implementation of transactions compliant with the JTA specification.

XA Transactions

Implementation of transactions compliant with the XA specification.

Relational Database Management Systems Persistence

Message persistency implemented using a relational database.

Message Prefetching

The feature to prefetch JMS messages from the JMS server to a synchronous JMS client. This can improve performance in certain scenarios.

Message Paging / Swapping

The feature to swap whenever necessary parts of the messages to a persistent store to free up main memory. This may cause persisting nonpersistent messages.

Multiple Queue Receivers

The JMS specification does not specify the behavior in case several consumers are registered on one and the same queue. The SAP’s JMS Provider supports multiple queue receivers and the behavior is configurable – round-robin delivery or exception on second receiver.

Dead Messages Support

Dead messages are messages that cannot be delivered to the client after a configurable number of attempts. Such messages are moved to a dedicated dead messages queue where an administrator can review them.

JMS Resources Deployment

The JMS resources an application needs are defined in a JMS resources descriptor and are automatically created during deployment. Deployment of applications that use JMS resources triggers a unified JMS resources deployment procedure that is driven by the JMS Connector and the JMS Provider in a sequence.

Automatic MDB Scaling

Scaling of MDBs on a queue can be achieved through the round-robin behavior of multiple queue receivers. When load is high, messages are delivered in parallel to multiple instances of the MDB.

HermesJMS Integration

Integration with the popular open-source administration and monitoring tool HermesJMS.

JMX / JSR77 Support

Remote administration and monitoring of the JMS Provider using JMX and/or JSR77.

Template Configuration

Configuration providing predefined templates for all JMS resources. Minimizes administration overhead. A special template for each JMS configuration entity type allows all configurations to derive from a certain template, inheriting all values and customizing part of them, thus facilitating the JMS administration.

Security Administration

The set of features to define, modify and enforce security restrictions to JMS resources and operations. Note that the JMS specification does not define any security aspects of the JMS service.

Store-and-Forward

This is a high-availability feature, which allows applications to reliably communicate between clusters over JMS. Any temporary connection losses that could happen during communication remain completely transparent to applications – messages are still delivered exactly once, in order.

 

End of Content Area