[cdi-dev] Async events. We need ideas to improve CDI-499

Jozef Hartinger jharting at redhat.com
Tue Feb 3 03:39:09 EST 2015

We should enumerate all the arguments supporting async flag on an 
observer. So far I have only seen one:

- an observer accessing @RequestScoped state would no longer be able to 
do so since it would be run in a worker thread

I am eager to hear more arguments as this single one may not be enough 
to justify the observer-async-flag design decision.

Remember that introducing fireAsync() itself does not break any existing 
application because existing applications are using fire(). It's when an 
existing application / library is modified to use fireAsync() when the 
problem may occur. Such change should not be done blindly. As with any 
other change, an author should consider possible consequences of the 
change. Clearly documenting the fact that fireAsync() processing is done 
in a different thread with a different @RequestScoped state may be 


On 02/02/2015 03:43 PM, Antoine Sabot-Durand wrote:
> Hi all,
> https://issues.jboss.org/browse/CDI-499 comes after a lot of 
> discussion about async events.
> I think the solution exposed here is quite satisfying, yet the idea to 
> need to activate async behaviour on the observer side doesn’t please a 
> lot of us. It’ll be confusing for users to have to activate async from 
> the firing end and consuming end to see it work :-(.
> I’d like to see alternative proposal to have this new feature as user 
> friendly as possible and keep the retro-compatibility aspect.  We 
> should find a better solution on our next meeting on wednesday.
> Antoine
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20150203/06b21b32/attachment-0001.html 

More information about the cdi-dev mailing list