The simplified API (
JMS_SPEC-64) defines a single object, javax.jms.MessagingContext, which provides methods for sending and receiving messages.
It is proposed that the JMS API define some standard annotations that can be used to inject MessagingContext objects into application code.
- The injection point should allow the application define the two parameters needed to create a MessagingContext: JNDI name (of the connection factory) and sessionMode. Both should be optional with suitable defaults.
- The implementation should ideally be implemented using CDI and have behaviour consistent with it. However this is not essential.
- It must be possible to use injection in Java EE applications. It is desirable but not essential to be able to use injection in Java SE applications.
- Injected MessagingContexts must have an appropriate scope and must be automatically closed when they fall out of scope.