users@jms-spec.java.net

[jms-spec users] [jsr343-experts] Re: (JMS_SPEC-70) Define annotations for injecting MessagingContext objects

From: Rüdiger zu Dohna <ruediger.dohna_at_1und1.de>
Date: Sun, 3 Jun 2012 22:10:01 +0200

Reza,

If I understand it correctly, the scope can't simple be dependent, because then the connection/session would not be closed after use. So it's not about extending the lifetime but about limiting it! The actual instance injected (Nigel calls this a proxy, as it just forwards most calls) will be dependent scoped, but the underlying connection/session must be transaction scoped.

Maybe we could find a better wording to explain this?


Rüdiger

On 2012-06-01, at 21:05, Reza Rahman wrote:

> I do think we should reconsider separate JMSContext instance for every
> injection point. It's likely overkill with the updated definition of the
> transaction scope and would otherwise simplify matters from a JMSContext
> implementation standpoint.
>