<div dir="ltr">Reza/all,<div><br></div><div>Do you suggest, others could/should take over as Spec Lead of a new Java EE Concurrency JSR or just gather ideas and do brainstorming, similar to e.g. what happens in JSR 375?</div><div><br></div><div><div class="gmail_extra"><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"><p style="margin:0px;border-collapse:collapse"><font face="arial, helvetica, sans-serif" size="1"><span lang="EN-US">Werner</span></font></p><span lang="EN-GB"><div style="font-family:arial,helvetica,sans-serif"><br><br></div></span></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Nov 17, 2015 at 1:37 PM,  <span dir="ltr">&lt;<a href="mailto:cdi-dev-request@lists.jboss.org" target="_blank">cdi-dev-request@lists.jboss.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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: [PROPOSAL] further align CDI and EJB (Reza Rahman)<br>
   2. Re: [PROPOSAL] further align CDI and EJB (Antonio Goncalves)<br>
   3. Re: [PROPOSAL] further align CDI and EJB (arjan tijms)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 16 Nov 2015 18:55:04 -0500<br>
From: Reza Rahman &lt;<a href="mailto:reza.rahman@oracle.com" target="_blank">reza.rahman@oracle.com</a>&gt;<br>
Subject: Re: [cdi-dev] [PROPOSAL] further align CDI and EJB<br>
To: &quot;<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&quot; &lt;<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:ECA2AF54-612C-4495-A8D2-04092A0110BB@oracle.com" target="_blank">ECA2AF54-612C-4495-A8D2-04092A0110BB@oracle.com</a>&gt;<br>
Content-Type: text/plain;       charset=utf-8<br>
<br>
One good thing is that Oracle has not yet filed a JSR for Java EE concurrency utilities targeting Java EE 8. That means any interested parties could do so and perhaps that could be better for the community in the end anyway.<br>
<br>
Certainly starting prototyping some of these things will make it clearer where they belong or could be contributed to in the end.<br>
<br>
&gt; On Nov 16, 2015, at 6:04 PM, Romain Manni-Bucau &lt;<a href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; 2015-11-16 14:54 GMT-08:00 Reza Rahman &lt;<a href="mailto:reza.rahman@oracle.com" target="_blank">reza.rahman@oracle.com</a>&gt;:<br>
&gt;&gt; Responses in-line:<br>
&gt;&gt;<br>
&gt;&gt;&gt; On Nov 16, 2015, at 5:44 PM, Romain Manni-Bucau &lt;<a href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 2015-11-16 14:40 GMT-08:00 Reza Rahman &lt;<a href="mailto:reza.rahman@oracle.com" target="_blank">reza.rahman@oracle.com</a>&gt;:<br>
&gt;&gt;&gt;&gt; In terms of CDI and EJB alignment, I think these would have the most<br>
&gt;&gt;&gt;&gt; value to the community going forward:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; * The equivalent of EJB @Startup, @DependsOn in CDI (Spring core has<br>
&gt;&gt;&gt;&gt; similarly nice syntax to handle eager loading).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; @Startup is there with @Initialized(ApplicationScoped) event<br>
&gt;&gt;&gt; @DependsOn is less important than for EJB IMO cause all CDI is lazy<br>
&gt;&gt;&gt; and full of proxies so not sure it would bring much to the game<br>
&gt;&gt;&gt; without bringing really much more like @Schedule etc...<br>
&gt;&gt;<br>
&gt;&gt; Yes, I know but eager loading is a common enough case to warrant better syntax/usability.<br>
&gt;<br>
&gt; fair enough<br>
&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; * The equivalent of EJB @Asynchronous, @Lock and @AccessTimeout for CDI.<br>
&gt;&gt;&gt;&gt; These are very useful bits of functionality that should be available to<br>
&gt;&gt;&gt;&gt; plain CDI beans without EJB. A similar @MaxConcurrency could also be<br>
&gt;&gt;&gt;&gt; extremely useful. EJB @Schedule is similarly useful but likely not right<br>
&gt;&gt;&gt;&gt; for CDI proper as it does not have that much to do with component<br>
&gt;&gt;&gt;&gt; life-cycle/bean access management. The others I think are quite natural<br>
&gt;&gt;&gt;&gt; fits for the core of a DI framework (in fact it may be awkward to have<br>
&gt;&gt;&gt;&gt; them elsewhere).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Think concurrency utilities can have a CDI integration rather than<br>
&gt;&gt;&gt; putting everything in CDI. It is globally all interceptors - at least<br>
&gt;&gt;&gt; in term of design - so would make sense to have them outside IMO - but<br>
&gt;&gt;&gt; a big +1 to get them cleanly added on top of CDI.<br>
&gt;&gt;<br>
&gt;&gt; Keep in mind, Java EE concurrency utilities is also minimally resourced and that&#39;s unlikely to change in the future. I would say if we think these features would help community/CDI adoption, it&#39;s likely wisest to find a way to do it in CDI proper. As I alluded to, these are also a bit easier to implement at the core DI container level than via interceptors. Things like @Transcational, @Schedule are easier as interceptors since they don&#39;t have as much to do with the internals of the component life-cycle and instance access control.<br>
&gt;<br>
&gt; well yes and not, it would be awesome to control where the concurrency<br>
&gt; is exactly in the stack and it would mean being able to change<br>
&gt; @Priority for instance.<br>
&gt;<br>
&gt; Overall point being that if we put features only where resources are<br>
&gt; instead of trying to put them where they fit and try to help these<br>
&gt; specs CDI will likely handle javascript integration soon ;).<br>
&gt;<br>
&gt; Concurrency and throttling have a potential spec which would be<br>
&gt; welcomed in these very distributed days, we just need to find people<br>
&gt; motivated enough to make it moving forward IMO.<br>
&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; As to doing more work in EJB, honestly it&#39;s likely best to leave EJB be<br>
&gt;&gt;&gt;&gt; at this stage. If there is a compelling reason that helps the platform<br>
&gt;&gt;&gt;&gt; and CDI generally we can see if it can be done. By default, EJB is<br>
&gt;&gt;&gt;&gt; pretty minimally resourced for Java EE 8 and that&#39;s pretty hard to<br>
&gt;&gt;&gt;&gt; change at this stage. In the community I have mostly seen requests for<br>
&gt;&gt;&gt;&gt; moving functionality out of EJB into CDI rather than the other way around...<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On 11/11/2015 2:47 PM, Mark Struberg wrote:<br>
&gt;&gt;&gt;&gt;&gt; Hi!<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; We already do a decent amount of ?side-by-side? handling in EJB and CDI. But there are still many aready where we could really move together much closer.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; E.g. the CDI spec defines that @Vetoed on EJBs must get accounted by the EJB container. But what happens with ProcessAnnotatedType#veto(). This one is not defined that clearly I fear.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; What if we (of course together with the EJB spec group) define that the EJB container must create the EJBs according to the effective AnnotatedType coming out after ProcessAnnotatedType? This would define that EJBs can also get modified via CDI Extensions. Some container do that already.<br>
&gt;&gt;&gt;&gt;&gt; The benefit of explicitly writing this down would obviously be that we would allow EJB to fully utilize the power of CDI Extensions in a portable way.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Any objections, any ideas, any howtos?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Let the ideas roll ;)<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; LieGrue,<br>
&gt;&gt;&gt;&gt;&gt; strub<br>
&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; cdi-dev mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&gt;&gt;&gt;&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;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&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;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; cdi-dev mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&gt;&gt;&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;&gt;&gt;<br>
&gt;&gt;&gt;&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>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 17 Nov 2015 14:44:35 +0100<br>
From: Antonio Goncalves &lt;<a href="mailto:antonio.goncalves@gmail.com" target="_blank">antonio.goncalves@gmail.com</a>&gt;<br>
Subject: Re: [cdi-dev] [PROPOSAL] further align CDI and EJB<br>
To: Reza Rahman &lt;<a href="mailto:reza.rahman@oracle.com" target="_blank">reza.rahman@oracle.com</a>&gt;<br>
Cc: &quot;<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&quot; &lt;<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:CA%2BZZq98nGkMYUj5uEt7UuGHFcttdoi7zTiH_mWK5n_9zy2EaNQ@mail.gmail.com" target="_blank">CA+ZZq98nGkMYUj5uEt7UuGHFcttdoi7zTiH_mWK5n_9zy2EaNQ@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
HI all,<br>
<br>
This discussion comes back on and off.<br>
<br>
At the last F2F meeting, we talked about having @Startup and @Shutdown in<br>
JSR 250. Talking to Bill and Linda, they don&#39;t seem reluctant to update the<br>
spec. No need to have @DependsOn as we will use @Priority with @Startup.<br>
<br>
@Schedule should go to Java EE Concurrency (implemented as a CDI<br>
interceptor) but not in CDI as this would be just moving more stuff inside<br>
CDI (which will end up as big as EJBs). Same for @Asynchronous.<br>
<br>
So what could be doable in CDI 2.1 is having @Startup and @Shutdown<br>
implemented... but the annotations would be in JSR 250.<br>
<br>
Antonio<br>
<br>
<br>
On Tue, Nov 17, 2015 at 12:55 AM, Reza Rahman &lt;<a href="mailto:reza.rahman@oracle.com" target="_blank">reza.rahman@oracle.com</a>&gt;<br>
wrote:<br>
<br>
&gt; One good thing is that Oracle has not yet filed a JSR for Java EE<br>
&gt; concurrency utilities targeting Java EE 8. That means any interested<br>
&gt; parties could do so and perhaps that could be better for the community in<br>
&gt; the end anyway.<br>
&gt;<br>
&gt; Certainly starting prototyping some of these things will make it clearer<br>
&gt; where they belong or could be contributed to in the end.<br>
&gt;<br>
&gt; &gt; On Nov 16, 2015, at 6:04 PM, Romain Manni-Bucau &lt;<a href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; 2015-11-16 14:54 GMT-08:00 Reza Rahman &lt;<a href="mailto:reza.rahman@oracle.com" target="_blank">reza.rahman@oracle.com</a>&gt;:<br>
&gt; &gt;&gt; Responses in-line:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt; On Nov 16, 2015, at 5:44 PM, Romain Manni-Bucau &lt;<a href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; 2015-11-16 14:40 GMT-08:00 Reza Rahman &lt;<a href="mailto:reza.rahman@oracle.com" target="_blank">reza.rahman@oracle.com</a>&gt;:<br>
&gt; &gt;&gt;&gt;&gt; In terms of CDI and EJB alignment, I think these would have the most<br>
&gt; &gt;&gt;&gt;&gt; value to the community going forward:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; * The equivalent of EJB @Startup, @DependsOn in CDI (Spring core has<br>
&gt; &gt;&gt;&gt;&gt; similarly nice syntax to handle eager loading).<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; @Startup is there with @Initialized(ApplicationScoped) event<br>
&gt; &gt;&gt;&gt; @DependsOn is less important than for EJB IMO cause all CDI is lazy<br>
&gt; &gt;&gt;&gt; and full of proxies so not sure it would bring much to the game<br>
&gt; &gt;&gt;&gt; without bringing really much more like @Schedule etc...<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Yes, I know but eager loading is a common enough case to warrant better<br>
&gt; syntax/usability.<br>
&gt; &gt;<br>
&gt; &gt; fair enough<br>
&gt; &gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; * The equivalent of EJB @Asynchronous, @Lock and @AccessTimeout for<br>
&gt; CDI.<br>
&gt; &gt;&gt;&gt;&gt; These are very useful bits of functionality that should be available<br>
&gt; to<br>
&gt; &gt;&gt;&gt;&gt; plain CDI beans without EJB. A similar @MaxConcurrency could also be<br>
&gt; &gt;&gt;&gt;&gt; extremely useful. EJB @Schedule is similarly useful but likely not<br>
&gt; right<br>
&gt; &gt;&gt;&gt;&gt; for CDI proper as it does not have that much to do with component<br>
&gt; &gt;&gt;&gt;&gt; life-cycle/bean access management. The others I think are quite<br>
&gt; natural<br>
&gt; &gt;&gt;&gt;&gt; fits for the core of a DI framework (in fact it may be awkward to have<br>
&gt; &gt;&gt;&gt;&gt; them elsewhere).<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Think concurrency utilities can have a CDI integration rather than<br>
&gt; &gt;&gt;&gt; putting everything in CDI. It is globally all interceptors - at least<br>
&gt; &gt;&gt;&gt; in term of design - so would make sense to have them outside IMO - but<br>
&gt; &gt;&gt;&gt; a big +1 to get them cleanly added on top of CDI.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Keep in mind, Java EE concurrency utilities is also minimally resourced<br>
&gt; and that&#39;s unlikely to change in the future. I would say if we think these<br>
&gt; features would help community/CDI adoption, it&#39;s likely wisest to find a<br>
&gt; way to do it in CDI proper. As I alluded to, these are also a bit easier to<br>
&gt; implement at the core DI container level than via interceptors. Things like<br>
&gt; @Transcational, @Schedule are easier as interceptors since they don&#39;t have<br>
&gt; as much to do with the internals of the component life-cycle and instance<br>
&gt; access control.<br>
&gt; &gt;<br>
&gt; &gt; well yes and not, it would be awesome to control where the concurrency<br>
&gt; &gt; is exactly in the stack and it would mean being able to change<br>
&gt; &gt; @Priority for instance.<br>
&gt; &gt;<br>
&gt; &gt; Overall point being that if we put features only where resources are<br>
&gt; &gt; instead of trying to put them where they fit and try to help these<br>
&gt; &gt; specs CDI will likely handle javascript integration soon ;).<br>
&gt; &gt;<br>
&gt; &gt; Concurrency and throttling have a potential spec which would be<br>
&gt; &gt; welcomed in these very distributed days, we just need to find people<br>
&gt; &gt; motivated enough to make it moving forward IMO.<br>
&gt; &gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; As to doing more work in EJB, honestly it&#39;s likely best to leave EJB<br>
&gt; be<br>
&gt; &gt;&gt;&gt;&gt; at this stage. If there is a compelling reason that helps the platform<br>
&gt; &gt;&gt;&gt;&gt; and CDI generally we can see if it can be done. By default, EJB is<br>
&gt; &gt;&gt;&gt;&gt; pretty minimally resourced for Java EE 8 and that&#39;s pretty hard to<br>
&gt; &gt;&gt;&gt;&gt; change at this stage. In the community I have mostly seen requests for<br>
&gt; &gt;&gt;&gt;&gt; moving functionality out of EJB into CDI rather than the other way<br>
&gt; around...<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; On 11/11/2015 2:47 PM, Mark Struberg wrote:<br>
&gt; &gt;&gt;&gt;&gt;&gt; Hi!<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; We already do a decent amount of ?side-by-side? handling in EJB and<br>
&gt; CDI. But there are still many aready where we could really move together<br>
&gt; much closer.<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; E.g. the CDI spec defines that @Vetoed on EJBs must get accounted by<br>
&gt; the EJB container. But what happens with ProcessAnnotatedType#veto(). This<br>
&gt; one is not defined that clearly I fear.<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; What if we (of course together with the EJB spec group) define that<br>
&gt; the EJB container must create the EJBs according to the effective<br>
&gt; AnnotatedType coming out after ProcessAnnotatedType? This would define that<br>
&gt; EJBs can also get modified via CDI Extensions. Some container do that<br>
&gt; already.<br>
&gt; &gt;&gt;&gt;&gt;&gt; The benefit of explicitly writing this down would obviously be that<br>
&gt; we would allow EJB to fully utilize the power of CDI Extensions in a<br>
&gt; portable way.<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; Any objections, any ideas, any howtos?<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; Let the ideas roll ;)<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; LieGrue,<br>
&gt; &gt;&gt;&gt;&gt;&gt; strub<br>
&gt; &gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt; &gt;&gt;&gt;&gt;&gt; cdi-dev mailing list<br>
&gt; &gt;&gt;&gt;&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt;&gt;&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;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; Note that for all code provided on this list, the provider licenses<br>
&gt; the code under the Apache License, Version 2 (<br>
&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; provided on this list, the provider waives all patent and other<br>
&gt; intellectual property rights inherent in such information.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; _______________________________________________<br>
&gt; &gt;&gt;&gt;&gt; cdi-dev mailing list<br>
&gt; &gt;&gt;&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt;&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;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Note that for all code provided on this list, the provider licenses<br>
&gt; the code under the Apache License, Version 2 (<br>
&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; provided on this list, the provider waives all patent and other<br>
&gt; intellectual property rights inherent in such information.<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<br>
&gt; code under the Apache License, Version 2 (<br>
&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; provided on this list, the provider waives all patent and other<br>
&gt; intellectual property rights inherent in such information.<br>
&gt;<br>
<br>
<br>
<br>
--<br>
Antonio Goncalves<br>
Software architect, Java Champion and Pluralsight author<br>
<br>
Web site &lt;<a href="http://www.antoniogoncalves.org" rel="noreferrer" target="_blank">http://www.antoniogoncalves.org</a>&gt; | Twitter<br>
&lt;<a href="http://twitter.com/agoncal" rel="noreferrer" target="_blank">http://twitter.com/agoncal</a>&gt; | LinkedIn &lt;<a href="http://www.linkedin.com/in/agoncal" rel="noreferrer" target="_blank">http://www.linkedin.com/in/agoncal</a>&gt; |<br>
Pluralsight<br>
&lt;<a href="http://pluralsight.com/training/Authors/Details/antonio-goncalves" rel="noreferrer" target="_blank">http://pluralsight.com/training/Authors/Details/antonio-goncalves</a>&gt; | Paris<br>
JUG &lt;<a href="http://www.parisjug.org" rel="noreferrer" target="_blank">http://www.parisjug.org</a>&gt; | Devoxx France &lt;<a href="http://www.devoxx.fr" rel="noreferrer" target="_blank">http://www.devoxx.fr</a>&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/cdi-dev/attachments/20151117/3399b142/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/attachments/20151117/3399b142/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 17 Nov 2015 15:03:32 +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] [PROPOSAL] further align CDI and EJB<br>
To: Antonio Goncalves &lt;<a href="mailto:antonio.goncalves@gmail.com" target="_blank">antonio.goncalves@gmail.com</a>&gt;<br>
Cc: &quot;<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&quot; &lt;<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
        &lt;CAE=-<a href="mailto:AhAhn2W-yvJgGHQdv7PNS2jjGbJouxNirYOKyekuy9s3mQ@mail.gmail.com" target="_blank">AhAhn2W-yvJgGHQdv7PNS2jjGbJouxNirYOKyekuy9s3mQ@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
Hi,<br>
<br>
On Tue, Nov 17, 2015 at 2:44 PM, Antonio Goncalves &lt;<br>
<a href="mailto:antonio.goncalves@gmail.com" target="_blank">antonio.goncalves@gmail.com</a>&gt; wrote:<br>
<br>
&gt; @Schedule should go to Java EE Concurrency (implemented as a CDI<br>
&gt; interceptor) but not in CDI as this would be just moving more stuff inside<br>
&gt; CDI (which will end up as big as EJBs). Same for @Asynchronous.<br>
&gt;<br>
<br>
100% agree with this. It&#39;s almost better not to do things if absolutely<br>
needed, then burden CDI with some concerns it perhaps should not be<br>
concerned with. It&#39;s already problematic that CDI crossed this bridge once<br>
with providing a Bean&lt;T&gt; for Servlet and other artifacts it doesn&#39;t own.<br>
<br>
As for @Asynchronous, a basic prototype implementation has already been<br>
created by several parties. I did one here:<br>
<a href="http://jdevelopment.nl/cdi-based-asynchronous-alternative" rel="noreferrer" target="_blank">http://jdevelopment.nl/cdi-based-asynchronous-alternative</a> and the Weld team<br>
did one here:<br>
<a href="https://github.com/weld/core/blob/master/tests-arquillian/src/test/java/org/jboss/weld/tests/interceptors/thread/async/AsyncInterceptor.java" rel="noreferrer" target="_blank">https://github.com/weld/core/blob/master/tests-arquillian/src/test/java/org/jboss/weld/tests/interceptors/thread/async/AsyncInterceptor.java</a><br>
<br>
Also interesting would be to go a little beyond what the EJB vesion offers<br>
and add support for a completable feature and optionally named thread pools.<br>
<br>
Kind regards,<br>
Arjan Tijms<br>
<br>
<br>
<br>
<br>
&gt;<br>
&gt; So what could be doable in CDI 2.1 is having @Startup and @Shutdown<br>
&gt; implemented... but the annotations would be in JSR 250.<br>
&gt;<br>
&gt; Antonio<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Nov 17, 2015 at 12:55 AM, Reza Rahman &lt;<a href="mailto:reza.rahman@oracle.com" target="_blank">reza.rahman@oracle.com</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt;&gt; One good thing is that Oracle has not yet filed a JSR for Java EE<br>
&gt;&gt; concurrency utilities targeting Java EE 8. That means any interested<br>
&gt;&gt; parties could do so and perhaps that could be better for the community in<br>
&gt;&gt; the end anyway.<br>
&gt;&gt;<br>
&gt;&gt; Certainly starting prototyping some of these things will make it clearer<br>
&gt;&gt; where they belong or could be contributed to in the end.<br>
&gt;&gt;<br>
&gt;&gt; &gt; On Nov 16, 2015, at 6:04 PM, Romain Manni-Bucau &lt;<a href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 2015-11-16 14:54 GMT-08:00 Reza Rahman &lt;<a href="mailto:reza.rahman@oracle.com" target="_blank">reza.rahman@oracle.com</a>&gt;:<br>
&gt;&gt; &gt;&gt; Responses in-line:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; On Nov 16, 2015, at 5:44 PM, Romain Manni-Bucau &lt;<br>
&gt;&gt; <a href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; 2015-11-16 14:40 GMT-08:00 Reza Rahman &lt;<a href="mailto:reza.rahman@oracle.com" target="_blank">reza.rahman@oracle.com</a>&gt;:<br>
&gt;&gt; &gt;&gt;&gt;&gt; In terms of CDI and EJB alignment, I think these would have the most<br>
&gt;&gt; &gt;&gt;&gt;&gt; value to the community going forward:<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; * The equivalent of EJB @Startup, @DependsOn in CDI (Spring core has<br>
&gt;&gt; &gt;&gt;&gt;&gt; similarly nice syntax to handle eager loading).<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; @Startup is there with @Initialized(ApplicationScoped) event<br>
&gt;&gt; &gt;&gt;&gt; @DependsOn is less important than for EJB IMO cause all CDI is lazy<br>
&gt;&gt; &gt;&gt;&gt; and full of proxies so not sure it would bring much to the game<br>
&gt;&gt; &gt;&gt;&gt; without bringing really much more like @Schedule etc...<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Yes, I know but eager loading is a common enough case to warrant<br>
&gt;&gt; better syntax/usability.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; fair enough<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; * The equivalent of EJB @Asynchronous, @Lock and @AccessTimeout for<br>
&gt;&gt; CDI.<br>
&gt;&gt; &gt;&gt;&gt;&gt; These are very useful bits of functionality that should be available<br>
&gt;&gt; to<br>
&gt;&gt; &gt;&gt;&gt;&gt; plain CDI beans without EJB. A similar @MaxConcurrency could also be<br>
&gt;&gt; &gt;&gt;&gt;&gt; extremely useful. EJB @Schedule is similarly useful but likely not<br>
&gt;&gt; right<br>
&gt;&gt; &gt;&gt;&gt;&gt; for CDI proper as it does not have that much to do with component<br>
&gt;&gt; &gt;&gt;&gt;&gt; life-cycle/bean access management. The others I think are quite<br>
&gt;&gt; natural<br>
&gt;&gt; &gt;&gt;&gt;&gt; fits for the core of a DI framework (in fact it may be awkward to<br>
&gt;&gt; have<br>
&gt;&gt; &gt;&gt;&gt;&gt; them elsewhere).<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Think concurrency utilities can have a CDI integration rather than<br>
&gt;&gt; &gt;&gt;&gt; putting everything in CDI. It is globally all interceptors - at least<br>
&gt;&gt; &gt;&gt;&gt; in term of design - so would make sense to have them outside IMO - but<br>
&gt;&gt; &gt;&gt;&gt; a big +1 to get them cleanly added on top of CDI.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Keep in mind, Java EE concurrency utilities is also minimally<br>
&gt;&gt; resourced and that&#39;s unlikely to change in the future. I would say if we<br>
&gt;&gt; think these features would help community/CDI adoption, it&#39;s likely wisest<br>
&gt;&gt; to find a way to do it in CDI proper. As I alluded to, these are also a bit<br>
&gt;&gt; easier to implement at the core DI container level than via interceptors.<br>
&gt;&gt; Things like @Transcational, @Schedule are easier as interceptors since they<br>
&gt;&gt; don&#39;t have as much to do with the internals of the component life-cycle and<br>
&gt;&gt; instance access control.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; well yes and not, it would be awesome to control where the concurrency<br>
&gt;&gt; &gt; is exactly in the stack and it would mean being able to change<br>
&gt;&gt; &gt; @Priority for instance.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Overall point being that if we put features only where resources are<br>
&gt;&gt; &gt; instead of trying to put them where they fit and try to help these<br>
&gt;&gt; &gt; specs CDI will likely handle javascript integration soon ;).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Concurrency and throttling have a potential spec which would be<br>
&gt;&gt; &gt; welcomed in these very distributed days, we just need to find people<br>
&gt;&gt; &gt; motivated enough to make it moving forward IMO.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; As to doing more work in EJB, honestly it&#39;s likely best to leave EJB<br>
&gt;&gt; be<br>
&gt;&gt; &gt;&gt;&gt;&gt; at this stage. If there is a compelling reason that helps the<br>
&gt;&gt; platform<br>
&gt;&gt; &gt;&gt;&gt;&gt; and CDI generally we can see if it can be done. By default, EJB is<br>
&gt;&gt; &gt;&gt;&gt;&gt; pretty minimally resourced for Java EE 8 and that&#39;s pretty hard to<br>
&gt;&gt; &gt;&gt;&gt;&gt; change at this stage. In the community I have mostly seen requests<br>
&gt;&gt; for<br>
&gt;&gt; &gt;&gt;&gt;&gt; moving functionality out of EJB into CDI rather than the other way<br>
&gt;&gt; around...<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; On 11/11/2015 2:47 PM, Mark Struberg wrote:<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; Hi!<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; We already do a decent amount of ?side-by-side? handling in EJB and<br>
&gt;&gt; CDI. But there are still many aready where we could really move together<br>
&gt;&gt; much closer.<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; E.g. the CDI spec defines that @Vetoed on EJBs must get accounted<br>
&gt;&gt; by the EJB container. But what happens with ProcessAnnotatedType#veto().<br>
&gt;&gt; This one is not defined that clearly I fear.<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; What if we (of course together with the EJB spec group) define that<br>
&gt;&gt; the EJB container must create the EJBs according to the effective<br>
&gt;&gt; AnnotatedType coming out after ProcessAnnotatedType? This would define that<br>
&gt;&gt; EJBs can also get modified via CDI Extensions. Some container do that<br>
&gt;&gt; already.<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; The benefit of explicitly writing this down would obviously be that<br>
&gt;&gt; we would allow EJB to fully utilize the power of CDI Extensions in a<br>
&gt;&gt; portable way.<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; Any objections, any ideas, any howtos?<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; Let the ideas roll ;)<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; LieGrue,<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; strub<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; cdi-dev mailing list<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt;&gt;&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; &gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt; Note that for all code provided on this list, the provider licenses<br>
&gt;&gt; the code 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;&gt; intellectual property rights inherent in such information.<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt;&gt;&gt; cdi-dev mailing list<br>
&gt;&gt; &gt;&gt;&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt;&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; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; Note that for all code provided on this list, the provider licenses<br>
&gt;&gt; the code 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;&gt; intellectual property rights inherent in such information.<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;&gt; code 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;&gt; intellectual property rights inherent in such information.<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Antonio Goncalves<br>
&gt; Software architect, Java Champion and Pluralsight author<br>
&gt;<br>
&gt; Web site &lt;<a href="http://www.antoniogoncalves.org" rel="noreferrer" target="_blank">http://www.antoniogoncalves.org</a>&gt; | Twitter<br>
&gt; &lt;<a href="http://twitter.com/agoncal" rel="noreferrer" target="_blank">http://twitter.com/agoncal</a>&gt; | LinkedIn<br>
&gt; &lt;<a href="http://www.linkedin.com/in/agoncal" rel="noreferrer" target="_blank">http://www.linkedin.com/in/agoncal</a>&gt; | Pluralsight<br>
&gt; &lt;<a href="http://pluralsight.com/training/Authors/Details/antonio-goncalves" rel="noreferrer" target="_blank">http://pluralsight.com/training/Authors/Details/antonio-goncalves</a>&gt; | Paris<br>
&gt; JUG &lt;<a href="http://www.parisjug.org" rel="noreferrer" target="_blank">http://www.parisjug.org</a>&gt; | Devoxx France &lt;<a href="http://www.devoxx.fr" rel="noreferrer" target="_blank">http://www.devoxx.fr</a>&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<br>
&gt; code under the Apache License, Version 2 (<br>
&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; provided on this list, the provider waives all patent and other<br>
&gt; intellectual 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/20151117/c074f5ae/attachment.html" rel="noreferrer" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/attachments/20151117/c074f5ae/attachment.html</a><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 60, Issue 13<br>
***************************************<br>
</blockquote></div><br></div></div></div>