Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
0.2-incubating
-
None
-
Websphere 8.0.0.1
Myfaces 2.1.1
Myfaces-Codi 1.0.4
Primefaces 3.1
Description
When multiple observer methods are handling the same ExceptionEvent<T extends Throwable> with same exception type and do have the same ordinal or no one defined, then only one observer method gets invoked.
This observer methods does not mark the event as handled, but the next ones do not get invoked.
With ordinal defined, it works as expected.
Example:
-------------
@CoreExceptionMessage(...) class CoreException {...} @ModuleExceptionMessage(...) class ModuleException extends CoreException {...} handleCore void (@Handles ExceptionEvent<CoreException> event) { // Handles CoreException instances, determined via @CoreExceptionMessage annotation...} handleModule void (@Handles ExceptionEvent<CoreException> event) { // Handles ModuleException instances, determined via @ModuleExceptionMessage annotation...}
If annotation is not found the event gets not handled, so one of the next handlers shall do handle it.
We do have an AbstractExceptionHandler which defines common work to do, and subtypes providing the @Handles annotated observer method and necessary data for the AbstractExceptionHandler such as annotation class.