Browse Prior Art Database

Invoking existing EJBs from asynchronous messages

IP.com Disclosure Number: IPCOM000014780D
Original Publication Date: 2001-Jun-16
Included in the Prior Art Database: 2003-Jun-20
Document File: 2 page(s) / 46K

Publishing Venue

IBM

Abstract

The IBM WebSphere family of products implements a server system that provides a mechanism for users to deploy and exploit Enterprise Java* Beans (EJBs) for their applications. This server environment is supported by suitable development tools. EJBs are called synchronously from Java clients using the IIOP network format. There is a growing need to enable the invocation of EJBs as a result of the arrival of a JMS message. This disclosure describes a design pattern for providing this support that makes use of a proposed extension to the EJB specification (EJB 2.0) called Message-driven Beans (MDB). It enables existing EJBs to be invoked as a result of the arrival of a JMS message without having to change these existing EJBs into MDBs. The advantage of this design pattern is that the existing EJBs can then be invoked from either IIOP or JMS.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 2

Invoking existing EJBs from asynchronous messages

The IBM WebSphere family of products implements a server system that provides a mechanism for users to deploy and exploit Enterprise Java* Beans (EJBs) for their applications. This server environment is supported by suitable development tools. EJBs are called synchronously from Java clients using the IIOP network format. There is a growing need to enable the invocation of EJBs as a result of the arrival of a JMS message. This disclosure describes a design pattern for providing this support that makes use of a proposed extension to the EJB specification (EJB 2.0) called Message-driven Beans (MDB). It enables existing EJBs to be invoked as a result of the arrival of a JMS message without having to change these existing EJBs into MDBs. The advantage of this design pattern is that the existing EJBs can then be invoked from either IIOP or JMS.

     The EJB 2.0 draft specification introduces a Message-driven bean (MDB), a third type of EJB, which may be thought of as a simplified type of Stateless Session bean. An MDB has no home or remote interface, and therefore cannot be invoked via IIOP.

     This invention solves this problem by providing an interface layer to receive the initial message, map the message to provide a set of parameters for an EJB, and then identify and invoke an existing EJB containing the Business Logic.

Server1

EJB Container

MDB

{ credit acct('----') }

BankAcct EJB

credit

{ ----(..)

}

JMS

Java Client

Java Client

Figure 1 - Single server configuration

     In figure 1, above, a message is received from the JMS provider and causes an MDB to be invoked, as defined by the J2EE specification. The JMS message is passed to the MDB as an input parameter. This invention extracts information from the message and then maps it into parameters that may be passed to another EJB. It uses extended server tooling to provide the development function, however, in the absence of suitable tooling the code could be hand crafted. The target EJB is th...