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

EJB MDB Client

The MDB client sends a message to the queue, which is processed at some later time by the MDB. The code in the client looks very much like the code we would expect to see in any messaging client. It creates an InitialContext connected to the naming service and then requests a reference to the QueueConnection factory. The QueueConnectionFactory is then used to create a QueueConnection, which is then used to create a QueueSession. (The message queues or subscription topics would have been created previously by an administrator.)

Now that we have a session, we need to obtain a reference to the specific queue for the MDB. the naming service returns the reference to the queue. The connection is then used to create a session, which is ...

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