deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Porter (JIRA)" <>
Subject [jira] [Commented] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal
Date Thu, 05 Jul 2012 17:52:33 GMT


Jason Porter commented on DELTASPIKE-218:

Okay, remember what's going on here (had to debug it to remember). If it's a handler for the
same type, both are either @Before or not and it's they both have the same ordinal, how am
I supposed to determine if they're separate handlers or not? Keep in mind we're using the
interface here, so a handler doesn't have to be a Java method. The ordinal is there to distinguish
which handler should be notified first if everything else is the same (In Seam 3 I called
it precedence which IMO made more sense).
> ExceptionHandler observer chain is broken with same ordinal
> -----------------------------------------------------------
>                 Key: DELTASPIKE-218
>                 URL:
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: ExceptionControl-Module
>    Affects Versions: 0.2-incubating
>         Environment: Websphere
> Myfaces 2.1.1
> Myfaces-Codi 1.0.4
> Primefaces 3.1
>            Reporter: Thomas Herzog
>            Assignee: Jason Porter
>             Fix For: 0.3-incubating
> 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
> With ordinal defined, it works as expected.
> Example:
> -------------
> {code}
> @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...}
> {code}
> 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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message