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.
>