Using an MDB as part of a web service

An MDB can be used in the support of a web service. When the need exists to asynchronously perform some action, a web client can send information to a web service which then repackages it in a message. The message can then be sent to a queue for processing at a later date. A framework for this type of task is presented here.

The use of asynchronous session beans can also be used to support this type of operation. The use of asynchronous methods is discussed in Chapter 2, Using an asynchronous method to create a background process recipe.

Getting ready

Essentially we will reuse parts of the recipes in Chapter 3, Message-Driven Beans dealing with Message-Driven Beans (MDB), specifically the Handling a text-based ...

Get EJB 3.1 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.