jsr343-experts@jms-spec.java.net

[jsr343-experts] Re: [jms-spec users] Re: Re: JMS 2.0 Early Draft ready for final review

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Tue, 20 Mar 2012 15:05:04 +0000

On 20/03/2012 14:20, Reza Rahman wrote:
> On 3/20/2012 9:30 AM, Rüdiger zu Dohna wrote:
>> I would leave the MessagingContext itself dependent scope. The underlying, eventually pooled Connection and/or Session
>> should be shared by all MessagingContexts within one transaction, so they all are sent within the same transaction and
>> in the guaranteed order.
>>
>> If there is no transaction available, every message is sent immediately with its own transaction/Session, and maybe
>> even Connection. The spec may be not perfectly clear, as it seems to refer to different threads or even different
>> clients using different sessions... message order is not guaranteed then. But here one thread sends multiple messages
>> while opening and closing a separate session for each message. I would be surprised, if any JMS provider would mess up
>> ordering in this case.
> This was my initial thought also. In fact, it would work fine in Java EE because of the restrictions on JMS. The trouble
> is that it breaks down if we try to use JMS context injection in Java SE and expect to use things like commit() and
> rollback().
>
> I'm still trying to make some time to get some much needed traction behind the CDI transaction scope (which I think will
> need to be inherently somewhat complex in order to be usable/robust). I'm hoping to at least get that properly revived
> this week and get Pete whatever he needs.

I look forward to seeing what you come up with.

Nigel

(I had a separate discussion with Reza last week about this)