jsr343-experts@jms-spec.java.net

[jsr343-experts] Re: JMS Support for DI

From: Clebert Suconic <clebert.suconic_at_gmail.com>
Date: Wed, 9 Nov 2011 18:45:06 -0600

Thanks Bruce.. I was a bit doubtful it was a good idea at first.. but later
I talked to some other people and more people seem to like the idea.


What I just thought also was adding the idea of a context.


in 90% of the cases I have seen, users are always creating a consumer
within a single Session. (because you have also the requirement of a
session per thread, per the spec).


In case you need more objects as part of the same context (request/response
case maybe), you could do this:


Consumer sameContextProducer = producer.getContext().createConsumer();

On this case both objects would be part of the same context. a commit call
on either consumer.

This would be the same idea as the Session. If people don't like the
name..fine.. we can keep the name of Session here.. but I guess you get the
idea.



This would need to be done on a new package as we would need the current
stuff backward compatible.