jsr343-experts@jms-spec.java.net

[jsr343-experts] Re: [jms-spec users] Re: JMS over CDI or something else?

From: John D. Ament <john.d.ament_at_gmail.com>
Date: Tue, 2 Aug 2011 13:10:11 -0400

Hi all,

I wanted to bring this back up. I am wondering if we can discuss around
this particular topic? I researched into the 3 open source JMS impls I know
of, and of them 2 do not support sending messages created by another
session/connection. Only OpenMQ supports that. Should it be supported
across the board?

John

On Mon, Jul 11, 2011 at 8:06 AM, Nigel Deakin <nigel.deakin_at_oracle.com>wrote:

> John,
>
>
> On 07/07/2011 20:07, John D. Ament wrote:
>
>>
>> 1. The event model is a direct integration between serializables and
>> sending JMS messages. Obviously, the big
>> limitation is that a created message needs to be bound to a specific JMS
>> session. For right now, there is no way to
>> guarantee that the JMS SEssion used to create a message fired is then
>> actually sent via that session, CDI doesn't have a
>> scope that confirms that.
>>
> (snip)
>
>
> 2. The simplified APIs provided in Seam JMS are really just meant to
>> supplement the fact that an injected
>> MessageProducer is completely unusable as you need to guarantee that the
>> JMS session injected for creating messages is
>> the same one used to create your producer.
>>
>
> I'm interested in your suggestion that you need to guarantee that the JMS
> session used for creating messages is the same one used to create your
> message producer. Where in the JMS spec or API do you think it says this?
>
> My own interpretation of the spec is that a MessageProducer must be able to
> send a javax.JMS.Message irrespective of how it was created. It might have
> been created using Session.createMessage(), or it may have been received by
> a MessageConsumer. It might even have been created by a foreign JMS provider
> (though the spec states that this might not be handled as efficiently as a
> provider's own implementation). Section 3.12 is worth reading.
>
> Anyone else have a view? Perhaps this is something we need to clarify, if
> it would make building frameworks easier.
>
> Nigel
>
>