[weld-dev] BeanManagerImpl permits multiple Contexts per scope type: why?

Laird Nelson ljnelson at gmail.com
Mon Nov 5 11:52:20 EST 2018


On Mon, Nov 5, 2018 at 1:15 AM Matej Novotny <manovotn at redhat.com> wrote:

> I just wonder, what is it you are ultimately trying to achieve with
> contexts since you are diving this deep?
> That is, if it's not classified ;)
>

Ha! No, not classified.  I am a big proponent of CDI and I like to fully
understand everything I work with.  I was just suddenly struck by the
slight awkwardness of this particular API, that's all. :-)


> If you retrieve an active context and store it for later use, by the time
> you reach for it, it may no longer be active.
>

Yes, or even by the time you receive the Context "back" from the
BeanManager#getContext(Class) call itself!  In other words, the API can't
really guarantee that it can honor its own contract!

Thanks for your time as always.

Best,
Laird
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20181105/81a8f9f2/attachment.html 


More information about the weld-dev mailing list