users@jms-spec.java.net

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

From: Reza Rahman <reza_rahman_at_lycos.com>
Date: Sun, 3 Jun 2012 19:44:38 -0400

Yes, you have it exactly correct, except that I don’t think the "proxy"
really need be dependent scoped either, significantly simplifying the
implementation to something like the attached code samples.

We have been struggling to make this understandable :-). The problem is that
the inherent issues are much more complex than for example an HTTP request
or session based life-cycles. I think Nigel's uses-cases are helpful:
http://java.net/projects/jms-spec/pages/JMSContextScopeUseCases? If you have
a better way of explaining this, it would definitely be very helpful :-).

> -----Original Message-----
> From: Rüdiger zu Dohna [mailto:ruediger.dohna_at_1und1.de]
> Sent: Sunday, June 03, 2012 4:10 PM
> To: jsr343-experts_at_jms-spec.java.net
> Subject: [jsr343-experts] Re: (JMS_SPEC-70) Define annotations for
injecting
> MessagingContext objects
>
> 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.
> >