<div dir="ltr"><div>Mark,</div><div><br></div><div>What do you mean by @Event?</div><div><br></div><div>CDI contains the Event interface, no annotation.</div><div>Are you proposing a new annotation or was it a typo?</div><div><br></div><div>So did you mean</div><div><br></div><div>@Async<br><br> private Event&lt;UserLoggedIn&gt; userLoggedInEventSource;</div><div class="gmail_extra"><br></div><div class="gmail_extra">below?</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="margin:0px;font-size:13px;border-collapse:collapse"><span lang="EN-US" style="font-family:Calibri">Werner</span>
</p><p style="margin:0px;font-size:13px;border-collapse:collapse"><br></p></div></div></div></div></div></div></div></div></div><div class="gmail_quote">On Tue, Feb 10, 2015 at 10:31 AM,  <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:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">Send cdi-dev mailing list submissions to<br>
        <a href="mailto:cdi-dev@lists.jboss.org">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" 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">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">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: Async events. We need ideas to improve CDI-499 (Mark Struberg)<br>
   2. Re: Async events. We need ideas to improve CDI-499 (Mark Struberg)<br>
   3. Re: Async events. We need ideas to improve CDI-499<br>
      (Jozef Hartinger)<br>
   4. Re: Async events. We need ideas to improve CDI-499<br>
      (Jozef Hartinger)<br>
   5. Re: Async events. We need ideas to improve CDI-499<br>
      (Jozef Hartinger)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 10 Feb 2015 07:53:30 +0000 (UTC)<br>
From: Mark Struberg &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt;<br>
Subject: Re: [cdi-dev] Async events. We need ideas to improve CDI-499<br>
To: Jos? Paumard &lt;<a href="mailto:jose.paumard@gmail.com">jose.paumard@gmail.com</a>&gt;<br>
Cc: cdi-dev &lt;<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:1995246191.1465726.1423554810674.JavaMail.yahoo@mail.yahoo.com">1995246191.1465726.1423554810674.JavaMail.yahoo@mail.yahoo.com</a>&gt;<br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
Hi Jos?!<br>
<br>
Backward compatibility is perfectly fine with both approaches. People can use BeanManager#fire() instead of the newly proposed BeanManager#fireAsync().<br>
<br>
<br>
My point is that many people will simply not be able to use fireAsync() because as a framework developer you really need to code defensive. Without an explicit opt-in on observer side fireAsync() can basically only be used in situations where you _exactly_ know all your observers...<br>
<br>
An own @Async annotation would also be nice as it could not only be used at @Observes but also for @Event<br>
<br>
@Inject<br>
@Async<br>
<br>
@Event<br>
<br>
private Event&lt;UserLoggedIn&gt; userLoggedInEventSource;<br>
<br>
<br>
The benefit of an own @Async annotation over extending e.g. the @Event annotation is that it would be perfectly backward compatible. This code would also run on CDI-1.0 .. 1.2 containers (as all annotations which are not available on the classpath will simply be ignored by the JVM.<br>
<br>
LieGrue,<br>
strub<br>
<br>
<br>
<br>
On Tuesday, 10 February 2015, 8:41, Jos? Paumard &lt;<a href="mailto:jose.paumard@gmail.com">jose.paumard@gmail.com</a>&gt; wrote:<br>
&gt;Mark,<br>
&gt;It vas never been in the mind of anyone to modify the way things work currently. Keeping the backward compatibility is a prerequisite to any kind of modification or improvment added to the spec. This has already been said and written several times.<br>
&gt;Jos?<br>
&gt;Le 10 f?vr. 2015 07:37, &quot;Mark Struberg&quot; &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt; a ?crit :<br>
&gt;<br>
&gt;Good morning!<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;Folks, please think a bit further.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;I&#39;ll give you a practical example. What should a developer do first? Eat their own dog food...<br>
&gt;&gt;<br>
&gt;&gt;Where does this apply to us? Means where do _we_ use CDI events? Right, in CDI Extensions.<br>
&gt;&gt;<br>
&gt;&gt;So ask yourself a simple question: if we like to leverage async events in CDI extensions then how could we do that? Your suggestion was to just use fireAsync instead of fire, right?<br>
&gt;&gt;<br>
&gt;&gt;Now imagine what would happen if we would do that... I&#39;d say most real world apps would go BOOOOMMMMM and not even finish the start. Simply because most CDI extensions are not built to be executed in parallel. Just look at Extensions who collect information about classes in @Observes ProcessAnnotatedType. Most of the time they collect this in a non-concurrent Set or List<br>
&gt;&gt;<br>
&gt;&gt;private final Collection&lt;AnnotatedType&lt;?&gt;&gt; messageBundleTypes = new HashSet&lt;AnnotatedType&lt;?&gt;&gt;();<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;If you fire the ProcessAnnotatedType event in parallel then you will blow up. And this was just ONE example. There are tons of other CDI Extension Events which would have the same result if switched to fireAsync.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;Now think about what would happen IF we would have an @Async on the observer?<br>
&gt;&gt;<br>
&gt;&gt;All would work. Old extensions still will get triggered in the same thread, but extensions with @Async would leverage parallel behaviour.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;I hope this practical sample makes it more clear why I think that most of the time we cannot simply switch to fireAsync if there is old code around which is not under your full control.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;LieGrue,<br>
&gt;&gt;strub<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; On Monday, 9 February 2015, 20:56, Romain Manni-Bucau &lt;<a href="mailto:rmannibucau@gmail.com">rmannibucau@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; &gt; I guess 2 is not a real need - and at least not why people voted for<br>
&gt;&gt;&gt; this feature. Difference between fireAsync and @Async is who decides<br>
&gt;&gt;&gt; to be asynchronous. Caller (fire) should clearly be able IMO - with<br>
&gt;&gt;&gt; all the warning we can put in the spec to say it should be done with<br>
&gt;&gt;&gt; compatible scopes. The second one is less important for me cause you<br>
&gt;&gt;&gt; can already do it with concurrency utilities (ee one or not) pretty<br>
&gt;&gt;&gt; easily.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Romain Manni-Bucau<br>
&gt;&gt;&gt; @rmannibucau<br>
&gt;&gt;&gt; <a href="http://www.tomitribe.com" target="_blank">http://www.tomitribe.com</a><br>
&gt;&gt;&gt; <a href="http://rmannibucau.wordpress.com" target="_blank">http://rmannibucau.wordpress.com</a><br>
&gt;&gt;&gt; <a href="https://github.com/rmannibucau" target="_blank">https://github.com/rmannibucau</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 2015-02-09 20:33 GMT+01:00 Mark Struberg &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt;:<br>
&gt;&gt;&gt;&gt;  Btw, did we already cover the &#39;fireAndForget&#39; vs<br>
&gt;&gt;&gt; &#39;fireAndWait&#39; use cases?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;  1. fireAndForget: this is basically what you get today if you use<br>
&gt;&gt;&gt; @javax.ejb.Asynchronous on an @Observer method<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;  2.) fireAndWait: call all observers in a new thread and only return after<br>
&gt;&gt;&gt; all observer methods did finish.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;  Did we already agree on one of the 2 modi? If not, do we like to support<br>
&gt;&gt;&gt; both? And if so, how to tell the CDI container which of the 2 modes to use for<br>
&gt;&gt;&gt; each observer?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;  If you answer the last question with yes then we might need some<br>
&gt;&gt;&gt; annotation/additional info on the observer method anyway. And then we are back<br>
&gt;&gt;&gt; on our @Async annotation on the observer method...<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;  LieGrue,<br>
&gt;&gt;&gt;&gt;  strub<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;  On Monday, 9 February 2015, 18:43, Romain Manni-Bucau<br>
&gt;&gt;&gt; &lt;<a href="mailto:rmannibucau@gmail.com">rmannibucau@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt; Guys I&#39;m not sure to fully get the jira description now. Can you try<br>
&gt;&gt;&gt;&gt;&gt; to rephrase it a bit?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Here what I see:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 1) fireAsync (+1) is clear<br>
&gt;&gt;&gt;&gt;&gt; 2) (part I dont fully get) asyncSupported: is it mandatory? If yes I<br>
&gt;&gt;&gt;&gt;&gt; think this API is not usable (=user friendly) and I would just suggest<br>
&gt;&gt;&gt;&gt;&gt; it is on by default and to remove this flag<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Can it break apps? Yes as mentionned by Mark. Will it break apps? No<br>
&gt;&gt;&gt;&gt;&gt; since it is not yet used and this is surely what we want. I fully<br>
&gt;&gt;&gt;&gt;&gt; understand all the mentionned pitfalls - but let me say @RequestScoped<br>
&gt;&gt;&gt;&gt;&gt; is by definition as broken as this today since you can&#39;t associate<br>
&gt;&gt;&gt; it<br>
&gt;&gt;&gt;&gt;&gt; with a request for the exact same reason. What I mean is: if you<br>
&gt;&gt;&gt;&gt;&gt; choose async then you assume it so I think we shouldn&#39;t protect the<br>
&gt;&gt;&gt;&gt;&gt; user from pitfalls then...in particular since we can&#39;t protect him<br>
&gt;&gt;&gt;&gt;&gt; from other as vicious issues.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Romain Manni-Bucau<br>
&gt;&gt;&gt;&gt;&gt; @rmannibucau<br>
&gt;&gt;&gt;&gt;&gt; <a href="http://www.tomitribe.com" target="_blank">http://www.tomitribe.com</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="http://rmannibucau.wordpress.com" target="_blank">http://rmannibucau.wordpress.com</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="https://github.com/rmannibucau" target="_blank">https://github.com/rmannibucau</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 2015-02-09 18:28 GMT+01:00 Antoine Sabot-Durand<br>
&gt;&gt;&gt; &lt;<a href="mailto:antoine@sabot-durand.net">antoine@sabot-durand.net</a>&gt;:<br>
&gt;&gt;&gt;&gt;&gt;&gt;  Mark I understand your concern, now can you understand the one we<br>
&gt;&gt;&gt; discussed about the fact of having to enable async at both ends is a source of<br>
&gt;&gt;&gt; confusion for end users and will give a bad perception of the spec.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;  So could we figure something user friendly to enable async event?<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;  Antoine<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;  Le 9 f?vr. 2015 ? 12:00, Mark Struberg<br>
&gt;&gt;&gt; &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt; a ?crit :<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;  But that might defeat pluggabilgity. Basically no framework can<br>
&gt;&gt;&gt; use fireAsync in that case.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;  Imagine a UserLoggedIn event. For most observers it is<br>
&gt;&gt;&gt; perfectly fine to observe this in a new thread. But some might need to access<br>
&gt;&gt;&gt; the session -&gt; boom. Which means that all frameworks have to fall back to the<br>
&gt;&gt;&gt; &#39;safe&#39; fire() instead of fireAsync()...<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;  That will leave us half-broken as it totally defeats the usage<br>
&gt;&gt;&gt; of this cool feature...<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;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  On Monday, 9 February 2015, 11:51, Antoine Sabot-Durand<br>
&gt;&gt;&gt; &lt;<a href="mailto:antoine@sabot-durand.net">antoine@sabot-durand.net</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  Mark,<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  During last meeting we didn?t say there wasn?t use case<br>
&gt;&gt;&gt; that would break<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  existing observer, we said that since we keep the current<br>
&gt;&gt;&gt; fire() method there is<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  backward compatibility. User trying to send fireAsync() and<br>
&gt;&gt;&gt; experiencing error<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  with legacy observer will have to fall back to fire().<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  Antoine<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  Le 9 f?vr. 2015 ? 11:12, Mark Struberg<br>
&gt;&gt;&gt; &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt; a ?crit :<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  Hi Jozef, here we go!<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  1.) accessing @RequestScoped beans in your Observer<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  2.) accessing @SessionScoped beans in your Observer<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  3.) accessing/relying on any transactional behaviour.<br>
&gt;&gt;&gt; This is really a<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  boomer. Basically you break transactions that way.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  4.) accessing @TransactionScoped beans in your Observer<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  5.) access/relying on any ThreadLocal in your Observer<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  6.) accessing attached entities in your Observers (they<br>
&gt;&gt;&gt; must only get<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  accessed from a very single Thread according to the JPA<br>
&gt;&gt;&gt; spec)<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  7.) using an EntityManager in a parallel thread might<br>
&gt;&gt;&gt; give you unexpected<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  results.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  There might be quite a few more. E.g. we need to<br>
&gt;&gt;&gt; specify that EJBs and<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  other EE features need to work in such a new Thread, etc<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  LieGrue,<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  strub<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  On Tuesday, 3 February 2015, 9:40, Jozef Hartinger<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  &lt;<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  We should enumerate all the arguments supporting<br>
&gt;&gt;&gt; async flag on an<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  observer. So far I have only seen one:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  - an observer accessing @RequestScoped state would<br>
&gt;&gt;&gt; no longer be able<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;     to do so since it would be run in a worker thread<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  I am eager to hear more arguments as this single<br>
&gt;&gt;&gt; one may not be<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;     enough to justify the observer-async-flag design<br>
&gt;&gt;&gt; decision.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  Remember that introducing fireAsync() itself does<br>
&gt;&gt;&gt; not break any<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;     existing application because existing applications<br>
&gt;&gt;&gt; are using fire().<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;     It&#39;s when an existing application / library is<br>
&gt;&gt;&gt; modified to use<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;     fireAsync() when the problem may occur. Such change<br>
&gt;&gt;&gt; should not be<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;     done blindly. As with any other change, an author<br>
&gt;&gt;&gt; should consider<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;     possible consequences of the change. Clearly<br>
&gt;&gt;&gt; documenting the fact<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;     that fireAsync() processing is done in a different<br>
&gt;&gt;&gt; thread with a<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;     different @RequestScoped state may be sufficient.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  Jozef<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  On 02/02/2015 03:43 PM, Antoine Sabot-Durand wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  Hi all,<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  <a href="https://issues.jboss.org/browse/CDI-499" target="_blank">https://issues.jboss.org/browse/CDI-499</a> comes<br>
&gt;&gt;&gt; after a lot of<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  discussion about async events.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  I think the solution exposed here is quite<br>
&gt;&gt;&gt; satisfying, yet the idea<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  to need to activate async behaviour on the observer side<br>
&gt;&gt;&gt; doesn?t please a lot of<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  us. It?ll be confusing for users to have to activate async<br>
&gt;&gt;&gt; from the firing end<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  and consuming end to see it work :-(.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  I?d like to see alternative proposal to have<br>
&gt;&gt;&gt; this new feature as<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  user friendly as possible and keep the retro-compatibility<br>
&gt;&gt;&gt; aspect.  We should<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  find a better solution on our next meeting on wednesday.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  Antoine<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  cdi-dev mailing list <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a> Note that<br>
&gt;&gt;&gt; for all code provided<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  on this list, the provider licenses the code under the<br>
&gt;&gt;&gt; Apache License, Version 2<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all<br>
&gt;&gt;&gt; other ideas provided<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  on this list, the provider waives all patent and other<br>
&gt;&gt;&gt; intellectual property<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  rights inherent in such information.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  cdi-dev mailing list<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  Note that for all code provided on this list, the<br>
&gt;&gt;&gt; provider licenses the<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  code under the Apache License, Version 2<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all<br>
&gt;&gt;&gt; other ideas provided<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  on this list, the provider waives all patent and other<br>
&gt;&gt;&gt; intellectual property<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  rights inherent in such information.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<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">cdi-dev@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;  <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" 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;&gt; the code under the Apache License, Version 2<br>
&gt;&gt;&gt; (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided<br>
&gt;&gt;&gt; on this list, the provider waives all patent and other intellectual property<br>
&gt;&gt;&gt; rights inherent in such information.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<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">cdi-dev@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt;  <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" 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<br>
&gt;&gt;&gt; code under the Apache License, Version 2<br>
&gt;&gt;&gt; (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided<br>
&gt;&gt;&gt; on this list, the provider waives all patent and other intellectual property<br>
&gt;&gt;&gt; rights inherent in such information.<br>
&gt;&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">cdi-dev@lists.jboss.org</a><br>
&gt;&gt;<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" 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 code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" 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>
&gt;<br>
<br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" 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" 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 51, Issue 21<br>
***************************************<br>
</blockquote></div><br></div></div>