<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Nov 5, 2018 at 1:15 AM Matej Novotny <<a href="mailto:manovotn@redhat.com">manovotn@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I just wonder, what is it you are ultimately trying to achieve with contexts since you are diving this deep?<br>
That is, if it's not classified ;)<br></blockquote><div><br></div><div>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. :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br></blockquote><div><br></div><div>Yes, or even by the time you receive the <font face="monospace">Context</font> "back" from the <font face="monospace">BeanManager#getContext(Class)</font> call itself! In other words, the API can't really guarantee that it can honor its own contract!</div><div><br></div><div>Thanks for your time as always.</div><div><br></div><div>Best,</div><div>Laird</div></div></div>