New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JMS 2.0 (JSR-343) [SPR-8197] #12846

spring-issuemaster opened this Issue Apr 4, 2011 · 1 comment


None yet
2 participants
Copy link

spring-issuemaster commented Apr 4, 2011

Chris Beams opened SPR-8197 and commented

JMS 2.0 (exploring a native JMS API style for use with Spring)


  • a "deliveryDelay" property on JmsTemplate
  • support for "deliveryDelay" and the new async sending methods in our CachedMessageProducer (reimplementing it as a JDK proxy for compatibility across JMS 1.1/2.0)
  • support for the new "create(Shared)DurableConsumer" variants in our CachedSession
  • support for the new "createSession" variants with fewer parameters in our SingleConnectionFactory

Issue Links:

  • #14515 Annotation-driven JMS endpoints

Referenced from: commits a3d7dc0


This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Mar 26, 2013

Juergen Hoeller commented

First pass completed, with support for the standard JMS 2.0 API in our CachingConnectionFactory and support for a delivery delay setting in JmsTemplate. Note that none of this has been tested against an actual JMS 2.0 provider yet, due to no such provider being available yet.

Known limitations:

  • Spring's SingleConnectionFactory and CachingConnectionFactory do not support createContext calls for JMSContext creation at this point. Note that the JMSContext model bypasses the point of a Connection/Session pool anyway; this will only really work with a native JMS 2.0 ConnectionFactory and provider-specific pooling such as in an EE environment.
  • JmsTemplate has no out-of-the-box support for send calls with an async completion listener. Note that a CompletionListener can be specified in a custom ProducerCallback implementation if really necessary. It has yet to be seen whether such support makes sense with JmsTemplate's core usage model.

There is no special support for the simplified JMSContext API, and likely never will be: JMSContext can be used from a native ConnectionFactory directly. @Inject JMSContext isn't supported due to rather involved rules for defining and scoping the injected context which are quite at odds with the Spring way of doing these things. We strongly recommend JmsTemplate instead, or @Resource ConnectionFactory with a createContext call within a Java 7 try-with-resources clause (as shown in the specification). After all, JMSContext has primarily been designed with EE's one-session-per-connection model and JTA transactions in mind, not with Spring-style use of a native JMS provider and native JMS transactions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment