Developing a message-driven bean

Before starting this part, make sure you have completed the setup described in “Utility project” on page 392 with the home factory.

Creating the data transfer object

We will use this object to transport the fromAccount, toAccount, and amount parameters to the MDB. We would like all the interfaces that our facade exposes to be in the same project. This includes the TransferDataObject class.

For simplicity, we will use the utility project (ItsoBank5Utility) to store the TransferDataObject.

Remark

Putting all exposed classes, exceptions and interfaces together in one project can help us later when we want to distribute them. If a third party wants to access the services exposed by our facade, we only have to give ...

Get EJB 2.0 Development with WebSphere Studio Application Developer now with O’Reilly online learning.

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