Session bean observer method validation did not correctly validate methods declared on a local interface which had a super interface.
As a result, deployments may have failed with `WELD-000088, Observer method must be static or local business method`. This occurred when a Session Bean class with an observer method inherits from an interface that does not have the method signature defined by its super interface, and at the same time the Session Bean class extends the class that has the method implementation.
Weld's internal session bean implementation has been fixed to include inherited methods in the `checkObserverMethods` method. As a result, deployments with the above implementation will now deploy successfully.
Created attachment 829269[details]
Reproducer provided by the customer
Description of problem:
Customer experiences WELD-000088, Observer method must be static or local business method: [method] public org.sis.weldTicket.BaseClass.observe(Object) on public@Stateless @Local class org.sis.weldTicket.BeanClass, when an EJB inherits from an interface that does not have the method signature defined by its super-interface and, at the same time, extends the class that has the method implementation.
This "BeanClass" extends "BaseClass" and implements "A" interface. "A" extends "B" without defining the method signature from "B". "BaseClass" has no annotation or implements any of the interfaces but contains the implementation of interface "B" signature. "BeanClass" has @Stateless and @Local(A.class).
Version-Release number of selected component (if applicable):
6.1.x
How reproducible:
Always reproducible
Steps to Reproduce:
Compile and deploy the attached reproducer
Actual results:
Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000088 Observer method must be static or local business method: [method] public org.sis.weldTicket.BaseClass.observe(Object) on public@Stateless @Local class org.sis.weldTicket.BeanClass
Expected results:
No exceptions
Created attachment 829269 [details] Reproducer provided by the customer Description of problem: Customer experiences WELD-000088, Observer method must be static or local business method: [method] public org.sis.weldTicket.BaseClass.observe(Object) on public@Stateless @Local class org.sis.weldTicket.BeanClass, when an EJB inherits from an interface that does not have the method signature defined by its super-interface and, at the same time, extends the class that has the method implementation. This "BeanClass" extends "BaseClass" and implements "A" interface. "A" extends "B" without defining the method signature from "B". "BaseClass" has no annotation or implements any of the interfaces but contains the implementation of interface "B" signature. "BeanClass" has @Stateless and @Local(A.class). Version-Release number of selected component (if applicable): 6.1.x How reproducible: Always reproducible Steps to Reproduce: Compile and deploy the attached reproducer Actual results: Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000088 Observer method must be static or local business method: [method] public org.sis.weldTicket.BaseClass.observe(Object) on public@Stateless @Local class org.sis.weldTicket.BeanClass Expected results: No exceptions