O'Reilly logo

Mastering Java EE Development with WildFly by Luca Stancapiano

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

The JMS context

A JMS context is the main interface in the simplified JMS API introduced for JMS 2.0. This adds the functionality of two different objects from the JMS 1.1 API--a connection and a session in a single object.

When an application needs to send messages, we need to use the createProducer method to create a JMSProducer, which provides methods to configure and send messages. Messages may be sent either synchronously or asynchronously.

When an application needs to receive messages, we need to use one of the several createConsumer or createDurableConsumer methods to create a JMS consumer . A JMS consumer provides methods to receive messages either synchronously or asynchronously.

According to the JMS 1.1 API, a JMS context should ...

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