O'Reilly logo

Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications by Paul Anderson, Gail Anderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.5. ShipOrder Message-Driven Bean

Asynchronous messages are useful for instigating tasks that take a long time to complete. The sender doesn't have to wait for a message to be delivered or for a receiver to carry out the subsequent request. Furthermore, loose coupling between senders and receivers makes systems more flexible as requirements change.

In this section we'll show you a JMS client producer that uses PTP messaging to interact with our online Music Collection Order processing system. This client, OrderApp, sends a message to a ShipOrder message-driven bean (ShipOrderBean). Upon receipt, the message-driven bean invokes a business method (shipOrdersByDate()) in our CustomerSession EJB. Recall that this method ships all orders with an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required