[weld-issues] [JBoss JIRA] Resolved: (WELD-280) Definition error detected when a bean has multiple callback interceptor methods (inherited)

Marius Bogoevici (JIRA) jira-events at lists.jboss.org
Mon Nov 9 05:22:05 EST 2009


     [ https://jira.jboss.org/jira/browse/WELD-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marius Bogoevici resolved WELD-280.
-----------------------------------

    Resolution: Cannot Reproduce Bug


THe test succeeds on me, which I think is correct. Our implementation is based on the assumption that an interceptor can *have* multiple inherited methods but may not *declare* multiple methods for the same type of interception.

> Definition error detected when a bean has multiple callback interceptor methods (inherited)
> -------------------------------------------------------------------------------------------
>
>                 Key: WELD-280
>                 URL: https://jira.jboss.org/jira/browse/WELD-280
>             Project: Weld
>          Issue Type: Bug
>          Components: Bootstrap and Metamodel API, Interceptors and Decorators
>    Affects Versions: 1.0.0.CR1
>            Reporter: Jozef Hartinger
>            Assignee: Marius Bogoevici
>             Fix For: 1.0.0.GA
>
>
> org.jboss.jsr299.tck.interceptors.tests.lifecycleCallback.order.InvocationOrderTest.testInvocationOrder()
> I am not sure if the current state conflicts the spec since it says:
> "Lifecycle callback interceptor methods may be defined on superclasses of the target class or interceptor
> classes. However, a given class may not have more than one lifecycle callback interceptor method for the same lifecycle event."
> On the other hand, it also says:
> "If an interceptor class itself has superclasses, the lifecycle callback interceptor methods defined by
> the interceptor class's superclasses are invoked before the lifecycle callback interceptor method
> defined by the interceptor class, most general superclass first."
> "If an interceptor class itself has superclasses, the lifecycle callback interceptor methods defined by
> the interceptor class's superclasses are invoked before the lifecycle callback interceptor method
> defined by the interceptor class, most general superclass first."
> which makes it obvious that a bean should be allowed to have multiple lifecycle callback interceptors (i.e one declared, one inherited) for a given lifecycle event - otherwise it would not make sense to define the order (most general superclass first.)
> Perhaps the first statement should say: "a given class may not declare more than one lifecycle callback interceptor method for the same lifecycle event." instead of "a given class may not have more than one lifecycle callback interceptor method for the same lifecycle event."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list