Top
Interstage Studio User's Guide
FUJITSU Software

3.3.3 Creating Message-driven Beans

To create a message-driven bean, use the Enterprise Bean wizard to create a message-driven bean class source file, then implement the message listener method (onMessage()). The method is described below.

Using the Create EJB 3.0 Message-Driven Bean Wizard to create Message-driven Bean Classes

Select [EJB] > [Message-Driven Bean] from the [New] wizard, and the message-driven bean is created by the wizard. Refer below for the settings which are set by the wizard.

When the wizard is executed, the Java source for the message-driven bean class is generated.

Implementing the Message Listener Method (onMessage())

An empty onMessage() method is defined in the Java source of the message-driven bean class generated by the wizard. Implement the processing for the received message in this method.