[ 
https://issues.apache.org/jira/browse/DELTASPIKE-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407407#comment-13407407
 ] 

Thomas Herzog commented on DELTASPIKE-218:
------------------------------------------

Ok i will do that, but what does the user doc mean with non-deterministic order 
when ordinal is the same ?
Can you give me an short example in which case this will behave like described 
in the doc, or please explain what is different with our usage, so that this 
wont work?
Because now i am a little bit confused. ;)

I have seen that we could use Qualifiers which i want to avoid because there 
are to many exceptions to annotate with, and the way with the ordinal is less 
work to do, because the order in which they get invoked does not matter, it has 
only to stop when event gets marked as handled.
                
> ExceptionHandler observer chain is broken with same ordinal
> -----------------------------------------------------------
>
>                 Key: DELTASPIKE-218
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-218
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: ExceptionControl-Module
>    Affects Versions: 0.2-incubating
>         Environment: Websphere 8.0.0.1
> 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 invoked.
> 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: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to