[
https://issues.jboss.org/browse/CDI-543?page=com.atlassian.jira.plugin.sy...
]
Martin Kouba commented on CDI-543:
----------------------------------
I think it would be more consistent if an exception thrown by any synchronous observer
aborts the processing of the event. On the other hand, this may not be the best thing from
the user point of view. E.g. an async observer is suddenly not notified after a sync obser
which throws an exception is added.
Handling exception during async event - contradiction?
------------------------------------------------------
Key: CDI-543
URL:
https://issues.jboss.org/browse/CDI-543
Project: CDI Specification Issues
Issue Type: Bug
Components: Events
Affects Versions: 2.0-EDR1
Reporter: Tomas Remes
In {{10.5. Observer notification}} there is (wrt sync observer method):
{quote}
Otherwise, the exception aborts processing of the event. No other observer methods of
that event will be called
{quote}
This looks like contradiction to {{10.5.1. Handling multiple exceptions thrown during an
asynchronous event}} where is:
{quote}
If an event is asynchronous, and an exception is thrown by any of its notified observers,
the CompletionStage returned by fireAsync will complete exceptionally ..
{quote}
The question is following: Async Event is fired -> some sync observers are notified
-> one of them throws exception -> async observers will be notified or not?
I assume they should be notified and therefore {{10.5. Observer notification}} needs an
update.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)