-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
1.0.0.CR1
-
None
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."