[ 
https://jira.jboss.org/browse/SEAMCATCH-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568466#comment-12568466
 ] 

Pete Muir commented on SEAMCATCH-23:
------------------------------------

Not sure what version of the spec you were looking at (this appears to have 
changed late on) but the definitive text reverses your statement.

10.2, bullet 3 "The observer method has all the event qualifiers. An observer 
method has an event qualifier if it has an observed event qualifier with (a) 
the same type and (b) the same annotation member value for each member which is 
not annotated @javax.enterprise.util.Nonbinding."


So, IOW the qualifiers on the event must be a subset of the qualifiers on the 
observer method. Furthermore, @Any is not implicit on the observer, but 
implicit on the event, so if you put @Any only on the observer method, then any 
event will match.

> Handlers without qualifiers should be notified even if ExceptionToCatch has 
> qualifiers
> --------------------------------------------------------------------------------------
>
>                 Key: SEAMCATCH-23
>                 URL: https://jira.jboss.org/browse/SEAMCATCH-23
>             Project: Seam Catch
>          Issue Type: Bug
>          Components: Core Implementation
>    Affects Versions: Alpha2
>            Reporter: Dan Allen
>            Assignee: Jason Porter
>             Fix For: Alpha3
>
>
> Qualifiers are meant to narrow the handlers that are invoked (in the same way 
> as observers). Less specific handlers (particularly handlers without any 
> qualifiers) should be notified if the set of qualifiers on the handler are a 
> subset of the qualifiers on the exception payload. Currently Catch fails this 
> assertion.
> Let's assume that the following exception (of type Throwable) is sent to 
> Catch:
> beanManager.fireEvent(new ExceptionToCatch(e, new 
> AnnotationLiteral<WebRequest>() {}));
> The following two handlers should match:
> void handleAny(@Handles CaughtException<Throwable> caught) {}
> void handleForWebRequest(@Handles @WebRequest CaughtException<Throwable> 
> caught) {}
> However, the following handler would not be invoked because it's qualifiers 
> are not a subset of the qualifiers on the exception payload:
> void handleForRestRequest(@Handles @RestRequest CaughtException<Throwable> 
> caught) {}
> For reference, see JSR-299, Section 10.2.3: Multiple event qualifiers

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues

Reply via email to