JMS 2.0 Specification
The JMS 2.0 specification introduces several new features, including delivery delay, shared subscriptions, asynchronous sending and the Simplified API.
The Simplified API is offered in addition to the API originally provided with JMS 1.1, which is now called the Classic API. The Simplified API is less verbose than the Classic API, and introduces several important new objects:
- JMSContext
Used to create messages, as well as JMS consumers and JMS producers. Each JMS context uses one session and one connection, but does not expose those. Additionally, multiple JMS context objects can share the same connection.
- JMSConsumer
A message consumer that has the ability to receive a message body without the need to use a Message object.
- JMSProducer
Similar to an anonymous message producer, and provides a convenient API for configuring delivery options, message properties, and message headers.
Methods in the Simplified API throw unchecked exceptions rather than checked exceptions. For a sample showing the Simplified API in use, see the new Java sample file called tibjmsJMSContextSendRecv.java. This sample file demonstrates the Simplified API in the simplest possible way; for greater detail, refer to the Java API Reference Pages.