Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

AutoCloseable JMS 2 Resources

DZone's Guide to

AutoCloseable JMS 2 Resources

· Performance Zone
Free Resource

Transform incident management with machine learning and analytics to help you maintain optimal performance and availability while keeping pace with the growing demands of digital business with this eBook, brought to you in partnership with BMC.

As the Java EE 7 release date draws closer, blogs and articles covering the new features are beginning to roll in. In a brief blog entry, John Ament, a key independent member of the JMS 2 expert group talks about AutoCloseable JMS 2 Resources. This feature takes advantage of Java SE 7 try-with-resources to significantly simplify the cleanup of JMS resources such as connections, sessions, message consumers and message producers. This is particularly important in non-Java EE environments where you are not using the new JMSContext API via @Inject. The blog entry includes downloadable JMS 2 code samples. John expects to write many more blog entries covering JMS 2, so stay tuned.

For those unaware, JMS 2 is now in the proposed final draft stage. Feel free to download the draft and take a look at it yourself. There is a very handly What is new in JMS 2.0? section towards the beginning of the document.



Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.

Topics:

Published at DZone with permission of Reza Rahman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}