Thanks Jozef,
You’re right. The best solution would be to prove that this doesn’t break backward
compatibility. I had the same feeling than you but I’d like the majority of us to agree
with this approach.
Antoine
Le 3 févr. 2015 à 09:39, Jozef Hartinger <jharting(a)redhat.com>
a écrit :
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 sufficient.
Jozef
On 02/02/2015 03:43 PM, Antoine Sabot-Durand wrote:
> Hi all,
>
>
>
https://issues.jboss.org/browse/CDI-499
<
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(a)lists.jboss.org <mailto:cdi-dev@lists.jboss.org>
>
https://lists.jboss.org/mailman/listinfo/cdi-dev
<
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
<
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.