794 WebSphere Business Integration Adapters
31.2.2 Generating the MDB
A message-driven bean (MDB) is a special kind of bean that gets called by the
JMS services in WebSphere Application Server when a message arrives in a
queue. Usually, the MDB does not do any business logic. It calls another bean to
process the actual message data.
In our scenario, we have the WSDL for the incoming message, and we have
WSDL for the EJB that needs to process the message. The generation of the
MDB uses both sets of WSDL files. To generate the MDB:
1. Locate the file RM_MaintenanceAgentDeliveryEJBService.wsdl in the
deployable service project Process_StartEJB. Right-click this WSDL file and
select Enterprise Services Generate Deploy Code.
2. Select the option to use an existing port for the inbound message. Click Next.
Figure 31-36 Generate deploy code for an existing port
Chapter 31. Integrating and automating the process 795
3. Point to the WSDL of the existing port, which is the WSDL of the EJB. Click
Browse.
4. Select the correct WSDL file (Figure 31-37) and click OK.
Figure 31-37 Select the inbound WSDL
5. The next window shows an error. Select the port that matches with the port in
the EJB WSDL. Select the Agent Delivery port.
796 WebSphere Business Integration Adapters
Figure 31-38 Select correct port
6. Click Finish in the next window (Figure 31-39 on page 797).
Chapter 31. Integrating and automating the process 797
Figure 31-39 MDB generation
7. A new project Process_StartEJBEJB has been created. Correct again the
library error.
8. An MDB uses a number of resources, for which you need to change the JNDI
names. Locate the MDB and open the EJB deployment descriptor.
798 WebSphere Business Integration Adapters
Figure 31-40 MDB in EJB project
9. In the EJB deployment descriptor editor, select the Beans tab.
10.Select the MDB itself and change the value of the listener port (Figure 31-41
on page 799).

Get WebSphere Business Integration Adapters: An Adapter Development and WebSphere Business Integration Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.