<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>My concern is too avoid creating a new EJB spec with CDI 2. Managing async operation is now very simple for end user with java 8, so do we have to add annotation to support it. I wonder. <br><br>Antoine Sabot-Durand</div><div><br>Le 21 janv. 2015 à 16:07, Werner Keil <<a href="mailto:werner.keil@gmail.com">werner.keil@gmail.com</a>> a écrit :<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>Hi Antoine,</div><div><br></div><div>It seems the exact place for that is still to be found, but even if these are separate threads in parallel the fact that CDI 2 aims to add support for async events means anything other JSRs cannot do or don't want to do (see Bill's remark on resources in other JSRs) would fit into CDI 2 as long as the resource situation here isn't too critical either of course;-)</div><div><br></div><div>That's what I wanted to say.</div><div><br></div><div>Werner</div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 21, 2015 at 4:01 PM, Antoine Sabot-Durand <span dir="ltr"><<a href="mailto:antoine@sabot-durand.net" target="_blank">antoine@sabot-durand.net</a>></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"><div style=""><div>Hi Werner,</div><div><br></div><div><br></div><div>No, it doesn’t cover @Asynchronous or @Async annotation. Discussion about async operation support in CDI 2.0 is another subject.</div><div><br></div><br><div><blockquote type="cite"><div>Le 21 janv. 2015 à 13:52, Werner Keil <<a href="mailto:werner.keil@gmail.com" target="_blank">werner.keil@gmail.com</a>> a écrit :</div><div><div class="h5"><br><div><div dir="ltr"><div>Antoine/all,</div><div><br></div><div>Is it safe to assume any recent discussion about an @Asynchronous annotation would be covered there unless e.g. EJB itself needs it to be updated for EE 8?<br></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="margin:0px;font-size:13px;border-collapse:collapse"><span lang="EN-US" style="font-family:Calibri">Werner </span></div><div style="margin:0px;font-size:13px;border-collapse:collapse"><span lang="EN-US" style="font-family:Calibri"></span><br></div></div></div></div></div></div></div></div></div></div><div class="gmail_quote">On Wed, Jan 21, 2015 at 1:06 PM, <span dir="ltr"><<a href="mailto:cdi-dev-request@lists.jboss.org" target="_blank">cdi-dev-request@lists.jboss.org</a>></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" 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" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
or, via email, send a message with subject or body 'help' 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 "Re: Contents of cdi-dev digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. [JBoss JIRA] (CDI-499) Firing events asynchronously<br>
(Antoine Sabot-Durand (JIRA))<br>
2. [JBoss JIRA] (CDI-31) Asynchronous events<br>
(Antoine Sabot-Durand (JIRA))<br>
3. [JBoss JIRA] (CDI-499) Firing events asynchronously<br>
(Antoine Sabot-Durand (JIRA))<br>
4. [JBoss JIRA] (CDI-499) Firing events asynchronously<br>
(Antoine Sabot-Durand (JIRA))<br>
5. [JBoss JIRA] (CDI-499) Firing events asynchronously<br>
(Jos? Paumard (JIRA))<br>
6. [JBoss JIRA] (CDI-499) Firing events asynchronously<br>
(Jozef Hartinger (JIRA))<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
<br>
Message: 6<br>
Date: Wed, 21 Jan 2015 07:06:49 -0500 (EST)<br>
From: "Jozef Hartinger (JIRA)" <<a href="mailto:issues@jboss.org" target="_blank">issues@jboss.org</a>><br>
Subject: [cdi-dev] [JBoss JIRA] (CDI-499) Firing events asynchronously<br>
To: <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
Message-ID:<br>
<<a href="mailto:JIRA.12561330.1421835166000.18078.1421842009269@Atlassian.JIRA" target="_blank">JIRA.12561330.1421835166000.18078.1421842009269@Atlassian.JIRA</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
<br>
[ <a href="https://issues.jboss.org/browse/CDI-499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034058#comment-13034058" target="_blank">https://issues.jboss.org/browse/CDI-499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034058#comment-13034058</a> ]<br>
<br>
Jozef Hartinger commented on CDI-499:<br>
-------------------------------------<br>
<br>
{quote}For backward compatibility reason the possibility to invoke an observer asynchronously should be let to the observer{quote}<br>
What exactly are the reasons for this? I can think of one:<br>
- observer method injecting a @RequestScoped (or similar) bean<br>
Are there other arguments for this?<br>
<br>
{quote}3. Observer bound to a transaction phase<br>
these observer will be invoked in the right transaction phase but asynchronously{quote}<br>
How's that different from Event.fire()?<br>
<br>
> Firing events asynchronously<br>
> -----------------------------<br>
><br>
> Key: CDI-499<br>
> URL: <a href="https://issues.jboss.org/browse/CDI-499" target="_blank">https://issues.jboss.org/browse/CDI-499</a><br>
> Project: CDI Specification Issues<br>
> Issue Type: Feature Request<br>
> Components: Events<br>
> Affects Versions: 1.2.Final<br>
> Reporter: Antoine Sabot-Durand<br>
><br>
> We should allow a way to fire event asynchronously. This mechanism should leverage new async API in JDK8 especially the {{CompletionStage}} interface.<br>
> Our proposal is:<br>
> h2. 1. Add {{fireAsync()}} method to {{Event}} and {{BeanManager}}<br>
> Signature of the method on {{Event<T>}} would be<br>
> {code:java}<br>
> <U extends T> CompletionStage<U> fireAsync(U event);<br>
> {code}<br>
> Signature on {{BeanManager}} would be<br>
> {code:java}<br>
> <T> CompletionStage<T> fireAsyncEvent(T event, Annotation... qualifiers)<br>
> {code}<br>
> h2. 2. Add an {{asyncSupported()}} member to {{@Observes}}<br>
> For backward compatibility reason the possibility to invoke an observer asynchronously should be let to the observer (legacy observers should be called synchronously). We propose to add the boolean {{asyncSupported()}} member with the {{false}} default value to support this backward compatibility aspect.<br>
> So to be notified asynchronously an observer should have {{asyncSupported}} member to true. otherwise it will be called synchronously.<br>
> h2. 3. Observer bound to a transaction phase<br>
> these observer will be invoked in the right transaction phase but asynchronously<br>
> h2. 4. Event Ordering<br>
> Should we decide to add events ordering in CDI 2.0, the order will be keep in asynchronous observer notification. If there are a mix of synchronous and asynchronous observer, asynchronous will be called first in order, then synchronous in their order (async has priority on sync).<br>
> h2. 5. Event state (payload mutability)<br>
> We'll keep payload mutability with async events (but should explicitly specify it). That means that we should guarantee the event state consistency between observers and in case of ordered observers the fact that observer N+1 get the event state at the end of observer N.<br>
<br>
<br>
<br>
--<br>
This message was sent by Atlassian JIRA<br>
(v6.3.11#6341)<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" 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 50, Issue 42<br>
***************************************<br>
</blockquote></div><br></div></div>
_______________________________________________<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" 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.</div></div></div></blockquote></div><br></div></blockquote></div><br></div></div>
</div></blockquote></body></html>