Show TOC Start of Content Area

Component documentation Developing a Message-Driven Bean Application  Locate the document in its SAP Library structure

The Task

Here you will find information about setting up a Java Message Service (JMS ) environment and developing message-driven beans (MDBs) on the SAP NetWeaver Application Server.

JMS is a messaging standard designed to eliminate many of the disadvantages of Message Oriented Middleware products faced over the past years. JMS allows two different styles of messaging (messaging domains):

      Publish/Subscribe – where many message producers talk to many message consumers.

      Point-To-Point – where multiple producers send messages to a queue, but each message is delivered only to one consumer. Usually the messages are delivered according to the First-In-First-Out (FIFO) strategy.

Here is an overview of the JMS API programming model:

This graphic is explained in the accompanying text

Overview of the JMS API Programming Model

Objective

By the end of this tutorial you will be able to create and use MDBs on the SAP NetWeaver Application Server, using the SAP’s JMS Provider. You have to set up the environment for running applications and to define a queue or topic in your JMS Provider. You do this using the SAP NetWeaver Developer Studio.

Prerequisites

System, Installed Applications, and Authorizations

      SAP NetWeaver Developer Studio is installed.

      AS Java is installed.

      JDK 5.0 of the SUN Microsystems is installed.

      You have administrative privileges to manage the configuration of the applications on the AS Java.

Knowledge

      Java programming language

      Basic understanding of the JMS programming model.

      Basic understanding of the MDB and EJB programming concepts.

      You have access to the AS Java.

      The procedures in this tutorial assume that you use the workbench default settings (Auto build, and so on).

Overview of the Steps in the Tutorial

These are the steps you have to take:

...

       1.      Create an EJB 3.0 Project and an Enterprise Application Archive (EAR).

More information: Creating an EJB 3.0 Project and an EAR Project

       2.      Set up the message driven bean in this project.

More information: Developing the Message-Driven Bean

       3.      Configure the JMS resources deployment descriptor, where you set up the connection factory and the destination. Implement the configuration XML Schema file.

More information: Configuring the JMS Resources

       4.      Deploy the EAR which results in the automatic deployment of all JMS resources defined in jms-resources.xml file.

More information: Deploying the EAR

       5.      Create the JMS client that sends messages. You can choose the type of the sender to be either an internal (that is residing on the server) Java EE client (another EJB, Servlet or JSP) or a remote Java client.

More information: Sender JMS Client Example

       6.      Start the example.

More information: Running the Example

Next Step

Creating an EJB 3.0 Project and an EAR Project

End of Content Area