You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Thomas Herzog (JIRA)" <ji...@apache.org> on 2012/07/04 12:28:34 UTC

[jira] [Created] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal

Thomas Herzog created DELTASPIKE-218:
----------------------------------------

             Summary: 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
             Fix For: 0.2-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

        

[jira] [Commented] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal

Posted by "Jason Porter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407401#comment-13407401 ] 

Jason Porter commented on DELTASPIKE-218:
-----------------------------------------

Add an ordinal to one of them that's not 0. Also not that the one with a higher ordinal will be invoked before the other one.

The reason for the difference in determining equality is so we don't end up adding the same handler more than once.
                
> 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

        

[jira] [Updated] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal

Posted by "Jason Porter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DELTASPIKE-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Porter updated DELTASPIKE-218:
------------------------------------

    Fix Version/s:     (was: 0.2-incubating)
                   0.3-incubating
    
> 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

        

[jira] [Commented] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal

Posted by "Jason Porter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407184#comment-13407184 ] 

Jason Porter commented on DELTASPIKE-218:
-----------------------------------------

Do you have @ExceptionHandler on your sub classes?
                
> 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

        

[jira] [Commented] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal

Posted by "Thomas Herzog (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Commented] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal

Posted by "Thomas Herzog (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407192#comment-13407192 ] 

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

Yes the @ExceptionHandler annotation is on all subclasses.
The observer methods are invoked if event is not marked as handled and they do define different ordinals
                
> 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

        

[jira] [Assigned] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DELTASPIKE-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg reassigned DELTASPIKE-218:
----------------------------------------

    Assignee: Jason Porter
    
> 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.2-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

        

[jira] [Resolved] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal

Posted by "Jason Porter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DELTASPIKE-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Porter resolved DELTASPIKE-218.
-------------------------------------

    Resolution: Not A Problem

I think this was a little misunderstanding with how things work and how the ordinal plays into the equality of a handler.
                
> 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

        

[jira] [Commented] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal

Posted by "Thomas Herzog (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407399#comment-13407399 ] 

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

I assumed that if there are multiple handlers for the same type then they get invoked in an non-deterministic order as long as the event gets not marked as handled, as the user doc says.
That is exactly the behavior we need.
What do i need to do, that you can determine the different handles ?

How we use it now:
---------------------------
abstract class AbstractExceptionHandler<E extends Throwable, M extends Annotation>() {

     abstract void handle(ExceptionEvent<E> event);

     private handleException(ExceptionEvent<E> event) { ... }

     abstract Class<M> getExceptionMessageAnnotation();
    
    ...
}

@ExceptionHandler
class CoreExceptionHandler()<CoreException, CoreExceptionMessage>{

     void handle(@Handles ExceptionEvent<CoreException> event) { ... }

     CoreExceptionMessage getExceptionMessageAnnotation(){
           return CoreExceptionMessage.class;
     }
}

@ExceptionHandler
class ModuleExceptionHandler()<CoreException, ModuleExceptionMessage>{

     void handle(@Handles ExceptionEvent<CoreException> event) { ... }

     ModuleExceptionMessage getExceptionMessageAnnotation(){
           return ModuleExceptionMessage.class;
     }
}
}
                
> 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

        

[jira] [Commented] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal

Posted by "Jason Porter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407324#comment-13407324 ] 

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: 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

        

[jira] [Commented] (DELTASPIKE-218) ExceptionHandler observer chain is broken with same ordinal

Posted by "Jason Porter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407481#comment-13407481 ] 

Jason Porter commented on DELTASPIKE-218:
-----------------------------------------

It looks like need to update the docs. I think they were left over from what I did in Seam 3 before I fixed a bug about adding the same handler more than once.
                
> 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