JMS 2.0 was finally released on 21 May 2013.
The specification document and API documentation of the JMS 2.0 final release may be downloaded from the JCP website here.
Since the JMS 2.0 final release there has since been a maintenance release which may be downloaded from the JCP website here. For more information see JMS 2.0 errata release (Rev a).
Browse the JMS 2.0 javadocs.
JMS 2.0 was developed by the Java Community Process as JSR 343.
Comments are invited. Reports of possible errors or omissions are especially welcome (note that there has since been an errata release). See Getting involved.
ContentsA full list of the new features, changes and clarifications introduced in JMS 2.0 is given in the specification. See section B.5 “Version 2.0” of the “Change history” appendix. Here is a summary:
The JMS 2.0 specification now requires JMS providers to implement both P2P and Pub-Sub.
The following new messaging features have been added in JMS 2.0:
The following change has been made to aid scalability:
Several changes have been made to the JMS API to make it simpler and easier to use:
Connection
, Session
and other objects with a close
method now implement the java.jang.AutoCloseable
interface to allow them to be used in a Java SE 7 try-with-resources statement.getBody
has been added to allow an application to extract the body directly from a Message without the need to cast it first to an appropriate subtype.A new chapter has been added which describes some additional restrictions and behaviour which apply when using the JMS API in the Java EE web or EJB container. This information was previously only available in the EJB and Java EE platform specifications.
A new chapter has been added which defines a number of standard configuration properties for JMS message-driven beans.
New methods have been added to Session
which return a MessageConsumer
on a durable topic subscription. Applications could previously only obtain a domain-specific TopicSubscriber
, even though its use was discouraged.
The specification has been clarified in various places.
The JMS 2.0 specification was developed by recording each proposed change in an issue tracker. There’s a summary of all issues incorporated into JMS 2.0 on the JMS 2.0 planning page.
More information about JMS 2.0Watch this 15 minute slide presentation.
Read these two OTN articles by by Nigel Deakin, JSR 343 spec lead:
Read Ten ways in which JMS 2.0 means writing less code.
If, having read about JMS 2.0, you have questions about why it was designed as it was, read the JMS 2.0 design FAQ.
Reference implementationThe purpose of a reference implementation is to prove that a specification can be implemented. There are two reference implementations for JMS 2.0.
The JMS 2.0 tutorial (part of the Java EE 7 tutorial) introduces the basics of JMS 2.0 and provides some simple examples that you can download and run.
JMS 2.0 demonstration examplesA NetBeans project which demonstrates some of the new features of JMS 2.0 may be downloaded as a zip or checked out from the project’s GitHub repository here. An earlier version was demonstrated at JavaOne 2012.
This demonstration (which was last updated to work with GlassFish build 82) shows
JMSContext
objectsJMSContext
objectsreceiveBody
method to synchronously receive a message and return its body in a single method callgetBody
method to return the body of a Message
without the need to cast it to a more specific message typePlease report issues with this demonstration using the issue tracker.
JMS 2.0 schedule (historical)Also see the JMS 2.0 Planning page.
Stage Initial planThis was based on the schedule for the Java EE 7 platform.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3