On 24/08/2015 17:30, Nigel Deakin wrote:
Over in the JMS 2.1 expert group I've just published some
proposals to allow any CDI managed bean in a Java EE
application to listen for JMS messages. This would be implemented as a standard CDI
portable extension and would become
a mandatory part of a full Java EE 8 application server.
I would welcome any comments from the CDI spec experts here. If you're interested in
helping, please take a look at
https://java.net/projects/jms-spec/pages/CDIBeansAsJMSListeners
and send comments or questions to me or to the public users(a)jms-spec.java.net alias.
Thank you for the feedback so far, which has been very helpful. I've also received
some very helpful comments from the
JMS expert group and community
If you planned to make comments but haven't got round to doing so, your feedback would
still be appreciated.
I've attempted to record all the comments made so far on a wiki page. This is at
https://java.net/projects/jms-spec/pages/CDIListenerBeanComments
Here's a summary of the comments so far:
* Is there a way to avoid the application having to inject and instantiate the listener
bean?
See
https://java.net/projects/jms-spec/pages/CDIListenerBeanComments#Creating...
* Is there a way for the queue, message selector etc to be specified at runtime rather
than hardcoded as an annotation?
See
https://java.net/projects/jms-spec/pages/CDIListenerBeanComments#Runtime_...
* It might be desirable to allow JMS listener beans to listen to temporary queues and
topics.
See
https://java.net/projects/jms-spec/pages/CDIListenerBeanComments#Listenin...
* It's important that my application deploys even if the JMS provider isn't fully
available yet
See
https://java.net/projects/jms-spec/pages/CDIListenerBeanComments#Handling...
* What scopes are active when the callback method is invoked?
See
https://java.net/projects/jms-spec/pages/CDIListenerBeanComments#What_sco...
* I think we should leverage the existing CDI event/observer functionality instead of
introducing a completely new
delivery mechanism
See
https://java.net/projects/jms-spec/pages/CDIListenerBeanComments#Are_CDI_...
Please feel free to make comments on those comments, or to raise new comments.
Nigel