<div dir="ltr">Antoine/all,<div><br></div><div>It seems, the security release is already out:</div><div><a href="https://search.maven.org/artifact/javax.enterprise/cdi-api/2.0.SP1/jar">https://search.maven.org/artifact/javax.enterprise/cdi-api/2.0.SP1/jar</a></div><div><br></div><div>Was there no structural change to the API so not calling it MR1 as none was filed or voted on according to JCP.org?</div><div><br></div><div>How does CDI plan to evolve? It is currently not under Jakarta EE, so do you plan to file a new JSR for CDI 2.1 (unless it is small enough to be a MR) or 3.0 via the JCP?</div><div><br></div><div>Regards,</div><div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="margin:0px;border-collapse:collapse"><font face="arial, helvetica, sans-serif" size="1"><span lang="EN-US">Werner </span></font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 16, 2018 at 10:11 AM &lt;<a href="mailto:cdi-dev-request@lists.jboss.org">cdi-dev-request@lists.jboss.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send cdi-dev mailing list submissions to<br>
        <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:cdi-dev-request@lists.jboss.org" target="_blank">cdi-dev-request@lists.jboss.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:cdi-dev-owner@lists.jboss.org" target="_blank">cdi-dev-owner@lists.jboss.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of cdi-dev digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: Portable decorable Bean&lt;T&gt; instances (arjan tijms)<br>
   2. Re: Portable decorable Bean&lt;T&gt; instances (Martin Kouba)<br>
   3. CDI security release around the corner (Antoine Sabot-Durand)<br>
   4. [JBoss JIRA] (CDI-732) Clarify that the Context for<br>
      RequestScoped must be active during @PreDestroy calls<br>
      (Mark Struberg (JIRA))<br>
   5. [JBoss JIRA] (CDI-732) Clarify that the Context for<br>
      RequestScoped must be active during @PreDestroy calls<br>
      (Romain Manni-Bucau (JIRA))<br>
   6. [JBoss JIRA] (CDI-730) The order in which contexts are<br>
      destroyed is undefined. (Mark Struberg (JIRA))<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 10 Jul 2018 12:45:12 +0100<br>
From: arjan tijms &lt;<a href="mailto:arjan.tijms@gmail.com" target="_blank">arjan.tijms@gmail.com</a>&gt;<br>
Subject: Re: [cdi-dev] Portable decorable Bean&lt;T&gt; instances<br>
To: Matej Novotny &lt;<a href="mailto:manovotn@redhat.com" target="_blank">manovotn@redhat.com</a>&gt;<br>
Cc: <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
Message-ID:<br>
        &lt;CAE=-<a href="mailto:AhD9wr1B-pC8BfpY7RA3CwHDKPBd-nsejwZn4__0%2Bmv3yw@mail.gmail.com" target="_blank">AhD9wr1B-pC8BfpY7RA3CwHDKPBd-nsejwZn4__0+mv3yw@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
Hi,<br>
<br>
Thanks for the reply. I already feared that to be the answer.<br>
<br>
This would probably be a good enhancement request for CDI 2.1. At the very<br>
least the BeanConfigurator could have a method like<br>
BeanConfigurator#setDecorators&lt;Decorator&lt;?&gt;... decorators. That&#39;s seemingly<br>
doable to implement by the CDI implementations.<br>
<br>
Kind regards,<br>
Arjan<br>
<br>
<br>
<br>
<br>
<br>
On Tue, Jul 10, 2018 at 11:04 AM Matej Novotny &lt;<a href="mailto:manovotn@redhat.com" target="_blank">manovotn@redhat.com</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; yes, there is no portable way.<br>
&gt; It is a similar situation as was with interceptors before<br>
&gt; InterceptionFactory was added.<br>
&gt;<br>
&gt; [impl &#39;details&#39;]<br>
&gt; In principle, to implement this, you need to create a &quot;wrapper class&quot;<br>
&gt; around the object which is to be intercepted/decorated.<br>
&gt; If you provide a custom way to create the bean, it is very difficult to<br>
&gt; create this wrapper on-the-fly.<br>
&gt; Even the solution for interceptors has some shortcomings and flaws and<br>
&gt; decorators seem even more complex (less restrictions on how does a<br>
&gt; decorator look like).<br>
&gt;<br>
&gt; Matej<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt; &gt; From: &quot;arjan tijms&quot; &lt;<a href="mailto:arjan.tijms@gmail.com" target="_blank">arjan.tijms@gmail.com</a>&gt;<br>
&gt; &gt; To: <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&gt; &gt; Sent: Tuesday, July 10, 2018 11:30:54 AM<br>
&gt; &gt; Subject: [cdi-dev] Portable decorable Bean&lt;T&gt; instances<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; When adding a manually constructed Bean&lt;T&gt; instance using<br>
&gt; &gt; AfterBeanDiscovery.addBean(Bean&lt;?&gt;), or using the<br>
&gt; &gt; AfterBeanDiscovery.addBean() method and the BeanConfigurator, the<br>
&gt; resulting<br>
&gt; &gt; bean can&#39;t be decorated.<br>
&gt; &gt;<br>
&gt; &gt; This is because seemingly CDI expects the create() method of Bean&lt;T&gt; to<br>
&gt; &gt; locate the decorators itself and apply them to the instance it returns.<br>
&gt; &gt;<br>
&gt; &gt; Using BeanManager.resolveDecorators one can obtain the Decorator&lt;T&gt;<br>
&gt; &gt; instances, but am I right that there&#39;s no portable way to actually apply<br>
&gt; &gt; those decorators to the bean instance?<br>
&gt; &gt;<br>
&gt; &gt; Kind regards,<br>
&gt; &gt; Arjan<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; cdi-dev mailing list<br>
&gt; &gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt;<br>
&gt; &gt; Note that for all code provided on this list, the provider licenses the<br>
&gt; code<br>
&gt; &gt; under the Apache License, Version 2<br>
&gt; &gt; (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas<br>
&gt; &gt; provided on this list, the provider waives all patent and other<br>
&gt; intellectual<br>
&gt; &gt; property rights inherent in such information.<br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/cdi-dev/attachments/20180710/df6ec1f4/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/attachments/20180710/df6ec1f4/attachment-0001.html</a> <br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 10 Jul 2018 14:46:23 +0200<br>
From: Martin Kouba &lt;<a href="mailto:mkouba@redhat.com" target="_blank">mkouba@redhat.com</a>&gt;<br>
Subject: Re: [cdi-dev] Portable decorable Bean&lt;T&gt; instances<br>
To: arjan tijms &lt;<a href="mailto:arjan.tijms@gmail.com" target="_blank">arjan.tijms@gmail.com</a>&gt;, Matej Novotny<br>
        &lt;<a href="mailto:manovotn@redhat.com" target="_blank">manovotn@redhat.com</a>&gt;<br>
Cc: <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
Message-ID: &lt;<a href="mailto:229cfa79-b39b-af5b-bc75-757085270acf@redhat.com" target="_blank">229cfa79-b39b-af5b-bc75-757085270acf@redhat.com</a>&gt;<br>
Content-Type: text/plain; charset=utf-8; format=flowed<br>
<br>
Dne 10.7.2018 v 13:45 arjan tijms napsal(a):<br>
&gt; Hi,<br>
&gt; <br>
&gt; Thanks for the reply. I already feared that to be the answer.<br>
&gt; <br>
&gt; This would probably be a good enhancement request for CDI 2.1. At the <br>
&gt; very least the BeanConfigurator could have a method like <br>
&gt; BeanConfigurator#setDecorators&lt;Decorator&lt;?&gt;... decorators. That&#39;s <br>
&gt; seemingly doable to implement by the CDI implementations.<br>
<br>
Well, it&#39;s not that simple. In order to make decorators work the <br>
instance produced by Bean#create(CreationalContext&lt;T&gt;) must be proxied, <br>
decorated types only include interfaces, etc.<br>
<br>
There are few issues related to this topic. I&#39;d suggest to walk through <br>
all those issues, close duplicates and outdated issues and create a new <br>
one with distilled summary...<br>
<br>
&gt; <br>
&gt; Kind regards,<br>
&gt; Arjan<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; On Tue, Jul 10, 2018 at 11:04 AM Matej Novotny &lt;<a href="mailto:manovotn@redhat.com" target="_blank">manovotn@redhat.com</a> <br>
&gt; &lt;mailto:<a href="mailto:manovotn@redhat.com" target="_blank">manovotn@redhat.com</a>&gt;&gt; wrote:<br>
&gt; <br>
&gt;     Hi,<br>
&gt; <br>
&gt;     yes, there is no portable way.<br>
&gt;     It is a similar situation as was with interceptors before<br>
&gt;     InterceptionFactory was added.<br>
&gt; <br>
&gt;     [impl &#39;details&#39;]<br>
&gt;     In principle, to implement this, you need to create a &quot;wrapper<br>
&gt;     class&quot; around the object which is to be intercepted/decorated.<br>
&gt;     If you provide a custom way to create the bean, it is very difficult<br>
&gt;     to create this wrapper on-the-fly.<br>
&gt;     Even the solution for interceptors has some shortcomings and flaws<br>
&gt;     and decorators seem even more complex (less restrictions on how does<br>
&gt;     a decorator look like).<br>
&gt; <br>
&gt;     Matej<br>
&gt; <br>
&gt;     ----- Original Message -----<br>
&gt;      &gt; From: &quot;arjan tijms&quot; &lt;<a href="mailto:arjan.tijms@gmail.com" target="_blank">arjan.tijms@gmail.com</a><br>
&gt;     &lt;mailto:<a href="mailto:arjan.tijms@gmail.com" target="_blank">arjan.tijms@gmail.com</a>&gt;&gt;<br>
&gt;      &gt; To: <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&gt;<br>
&gt;      &gt; Sent: Tuesday, July 10, 2018 11:30:54 AM<br>
&gt;      &gt; Subject: [cdi-dev] Portable decorable Bean&lt;T&gt; instances<br>
&gt;      &gt;<br>
&gt;      &gt; Hi,<br>
&gt;      &gt;<br>
&gt;      &gt; When adding a manually constructed Bean&lt;T&gt; instance using<br>
&gt;      &gt; AfterBeanDiscovery.addBean(Bean&lt;?&gt;), or using the<br>
&gt;      &gt; AfterBeanDiscovery.addBean() method and the BeanConfigurator, the<br>
&gt;     resulting<br>
&gt;      &gt; bean can&#39;t be decorated.<br>
&gt;      &gt;<br>
&gt;      &gt; This is because seemingly CDI expects the create() method of<br>
&gt;     Bean&lt;T&gt; to<br>
&gt;      &gt; locate the decorators itself and apply them to the instance it<br>
&gt;     returns.<br>
&gt;      &gt;<br>
&gt;      &gt; Using BeanManager.resolveDecorators one can obtain the Decorator&lt;T&gt;<br>
&gt;      &gt; instances, but am I right that there&#39;s no portable way to<br>
&gt;     actually apply<br>
&gt;      &gt; those decorators to the bean instance?<br>
&gt;      &gt;<br>
&gt;      &gt; Kind regards,<br>
&gt;      &gt; Arjan<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;      &gt; _______________________________________________<br>
&gt;      &gt; cdi-dev mailing list<br>
&gt;      &gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&gt;<br>
&gt;      &gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt;      &gt;<br>
&gt;      &gt; Note that for all code provided on this list, the provider<br>
&gt;     licenses the code<br>
&gt;      &gt; under the Apache License, Version 2<br>
&gt;      &gt; (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other<br>
&gt;     ideas<br>
&gt;      &gt; provided on this list, the provider waives all patent and other<br>
&gt;     intellectual<br>
&gt;      &gt; property rights inherent in such information.<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; cdi-dev mailing list<br>
&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; <br>
&gt; Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
&gt; <br>
<br>
-- <br>
Martin Kouba<br>
Senior Software Engineer<br>
Red Hat, Czech Republic<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Wed, 11 Jul 2018 10:10:54 +0200<br>
From: Antoine Sabot-Durand &lt;<a href="mailto:asd@redhat.com" target="_blank">asd@redhat.com</a>&gt;<br>
Subject: [cdi-dev] CDI security release around the corner<br>
To: CDI Java EE Specification &lt;<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
        &lt;CAHTnX=<a href="mailto:cPEQngop0ASYtu8ge6CLDx%2B38WcK3pi-z_VtYCOAa3eA@mail.gmail.com" target="_blank">cPEQngop0ASYtu8ge6CLDx+38WcK3pi-z_VtYCOAa3eA@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
Hi all,<br>
<br>
As stated a few weeks ago we have worked on issues in CDI API regarding<br>
security manager.<br>
<br>
2 PR are currently open [1] [2]. The first one is ready to merge, second<br>
one need some discussion and possible rework.<br>
<br>
If none of you raise concern about these, I plan to merge these PR and<br>
release CDI 2.0.SP1 by the end of next week.<br>
<br>
Thanks for your feedback,<br>
<br>
Antoine<br>
<br>
<br>
[1] <a href="https://github.com/cdi-spec/cdi/pull/390" rel="noreferrer" target="_blank">https://github.com/cdi-spec/cdi/pull/390</a><br>
[2] <a href="https://github.com/cdi-spec/cdi/pull/391" rel="noreferrer" target="_blank">https://github.com/cdi-spec/cdi/pull/391</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/cdi-dev/attachments/20180711/217bf5ab/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/attachments/20180711/217bf5ab/attachment-0001.html</a> <br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Mon, 16 Jul 2018 03:01:00 -0400 (EDT)<br>
From: &quot;Mark Struberg (JIRA)&quot; &lt;<a href="mailto:issues@jboss.org" target="_blank">issues@jboss.org</a>&gt;<br>
Subject: [cdi-dev] [JBoss JIRA] (CDI-732) Clarify that the Context for<br>
        RequestScoped must be active during @PreDestroy calls<br>
To: <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
Message-ID:<br>
        &lt;JIRA.12757897.1530531484000.672.1531724460377@Atlassian.JIRA&gt;<br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
<br>
    [ <a href="https://issues.jboss.org/browse/CDI-732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13605259#comment-13605259" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/CDI-732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13605259#comment-13605259</a> ] <br>
<br>
Mark Struberg commented on CDI-732:<br>
-----------------------------------<br>
<br>
&gt; It seems logical to first destroy the &quot;shorter-lived&quot; scopes<br>
<br>
Hmm but Welds destroy order according to CDI-730 is<br>
&gt; At present weld destroys conversation, request, then session context in that order.<br>
conversation is clearly longer than request. Thus this argument makes no sense. <br>
<br>
Another point to think about: in CDI the RequestScoped Context is also used as kind of &#39;ThreadScoped&#39;. For example it is also active in an Asynchronous EJB method, in JBatch threads, etc. <br>
<br>
So even if the Session gets destroyed outside of a HTTP Request (e.g. via timeout), then we could start a RequestContext, perform the @PreDestroy method and stop if afterwards. <br>
<br>
&gt; Clarify that the Context for RequestScoped must be active during @PreDestroy calls<br>
&gt; ----------------------------------------------------------------------------------<br>
&gt;<br>
&gt;                 Key: CDI-732<br>
&gt;                 URL: <a href="https://issues.jboss.org/browse/CDI-732" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/CDI-732</a><br>
&gt;             Project: CDI Specification Issues<br>
&gt;          Issue Type: Feature Request<br>
&gt;          Components: Contexts<br>
&gt;    Affects Versions: 2.0 .Final<br>
&gt;            Reporter: Mark Struberg<br>
&gt;<br>
&gt; We have the explicit rule that the Context for @RequestScoped must be active during @PostConstruct of any bean. <br>
&gt; But it seems we don&#39;t force the same for invocations of @PreDestroy methods.<br>
&gt; That&#39;s especially weird since a few containers now blow up during a destroyal of a @SessionScopedBean which has a @RequestScoped Principal injected, even if the session destroyal was triggered by an explicit Session#invalidate() call in an open HTTP request.<br>
<br>
<br>
<br>
--<br>
This message was sent by Atlassian JIRA<br>
(v7.5.0#75005)<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Mon, 16 Jul 2018 03:05:00 -0400 (EDT)<br>
From: &quot;Romain Manni-Bucau (JIRA)&quot; &lt;<a href="mailto:issues@jboss.org" target="_blank">issues@jboss.org</a>&gt;<br>
Subject: [cdi-dev] [JBoss JIRA] (CDI-732) Clarify that the Context for<br>
        RequestScoped must be active during @PreDestroy calls<br>
To: <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
Message-ID:<br>
        &lt;JIRA.12757897.1530531484000.702.1531724700312@Atlassian.JIRA&gt;<br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
<br>
    [ <a href="https://issues.jboss.org/browse/CDI-732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13605260#comment-13605260" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/CDI-732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13605260#comment-13605260</a> ] <br>
<br>
Romain Manni-Bucau commented on CDI-732:<br>
----------------------------------------<br>
<br>
[~struberg] this doesn&#39;t solve the problem correctly IMHO. request = thread scope is an abuse of users but not what is the scope normally. A lot of usages are about request = ... request :). If you think about an audit implementation by request you breaks it if the request scope is not the last one destroyed so I think session should be destroyed before the request in any case. Having 2 instances in the same real servlet request would be very misleading and pretty much unusable at all stages (perf, understanding, impl).<br>
<br>
&gt; Clarify that the Context for RequestScoped must be active during @PreDestroy calls<br>
&gt; ----------------------------------------------------------------------------------<br>
&gt;<br>
&gt;                 Key: CDI-732<br>
&gt;                 URL: <a href="https://issues.jboss.org/browse/CDI-732" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/CDI-732</a><br>
&gt;             Project: CDI Specification Issues<br>
&gt;          Issue Type: Feature Request<br>
&gt;          Components: Contexts<br>
&gt;    Affects Versions: 2.0 .Final<br>
&gt;            Reporter: Mark Struberg<br>
&gt;<br>
&gt; We have the explicit rule that the Context for @RequestScoped must be active during @PostConstruct of any bean. <br>
&gt; But it seems we don&#39;t force the same for invocations of @PreDestroy methods.<br>
&gt; That&#39;s especially weird since a few containers now blow up during a destroyal of a @SessionScopedBean which has a @RequestScoped Principal injected, even if the session destroyal was triggered by an explicit Session#invalidate() call in an open HTTP request.<br>
<br>
<br>
<br>
--<br>
This message was sent by Atlassian JIRA<br>
(v7.5.0#75005)<br>
<br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Mon, 16 Jul 2018 04:11:00 -0400 (EDT)<br>
From: &quot;Mark Struberg (JIRA)&quot; &lt;<a href="mailto:issues@jboss.org" target="_blank">issues@jboss.org</a>&gt;<br>
Subject: [cdi-dev] [JBoss JIRA] (CDI-730) The order in which contexts<br>
        are destroyed is undefined.<br>
To: <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
Message-ID:<br>
        &lt;JIRA.12756107.1529484750000.1399.1531728660954@Atlassian.JIRA&gt;<br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
<br>
    [ <a href="https://issues.jboss.org/browse/CDI-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13605310#comment-13605310" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/CDI-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13605310#comment-13605310</a> ] <br>
<br>
Mark Struberg commented on CDI-730:<br>
-----------------------------------<br>
<br>
I understand the argument that the order is really hard to get right.<br>
But I would love if we could clarify the following:<br>
<br>
* When a request ends, first ALL the @BeforeDestroyed events for the following contexts are sent: RequestScope, ConversationScoped (if context ends), SessionScoped (if session ends)<br>
* Only after that the proper @PreDestroy methods are called on all those scopes.<br>
<br>
PS: the deferral of the session destroy to the end of the request is a left over of the (failed) Seam2 compatibility mode. It should have never be done that way and really causes tons of problems :(<br>
In OWB there is even a way to turn this off and make it follow the standard Servlets Sesion lifecycle because it caused so many problems.<br>
<br>
&gt; The order in which contexts are destroyed is undefined.<br>
&gt; -------------------------------------------------------<br>
&gt;<br>
&gt;                 Key: CDI-730<br>
&gt;                 URL: <a href="https://issues.jboss.org/browse/CDI-730" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/CDI-730</a><br>
&gt;             Project: CDI Specification Issues<br>
&gt;          Issue Type: Clarification<br>
&gt;    Affects Versions: 2.Future, 1.2.Final, 2.0 .Final<br>
&gt;            Reporter: Benjamin Confino<br>
&gt;            Priority: Minor<br>
&gt;<br>
&gt; The order in which contexts are destroyed is not defined in the spec, I believe this should be made explicit.<br>
&gt; At present weld destroys conversation, request, then session context in that order. I think this should become the standard and written into the spec.<br>
&gt; For background there is this email by Martin Kouba: <a href="http://lists.jboss.org/pipermail/weld-dev/2018-June/003694.html" rel="noreferrer" target="_blank">http://lists.jboss.org/pipermail/weld-dev/2018-June/003694.html</a><br>
<br>
<br>
<br>
--<br>
This message was sent by Atlassian JIRA<br>
(v7.5.0#75005)<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
<br>
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>).  For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
<br>
End of cdi-dev Digest, Vol 89, Issue 2<br>
**************************************<br>
</blockquote></div></div></div>