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 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.