Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-280

Definition error detected when a bean has multiple callback interceptor methods (inherited)

XMLWordPrintable

      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."

              marius.bogoevici Marius Bogoevici (Inactive)
              rhn-engineering-jharting Jozef Hartinger
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: