O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

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

Using JMS with a Message Queue

In the following example, a message queue is used to process orders for sales of movies. A queue has been established in the JBoss message queue with the JNDI name of queue/movie-orders. The client application inserts a set of orders into the queue. An order listener is created to listen to the queue and, when orders are available, retrieves the orders and processes them. Order processing is performed using helper classes.

Since these examples use a message queue and expect to perform asynchronous messaging, there is no timing requirement between the client and the recipient. If the recipient of the message is not connected to the queue, the message is stored (persisted) until some point in the future when a process ...

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