Bug 1034776

Summary: Incorrect handling of business interfaces for EJBs (where defining class of business method is not the Business interface of the EJBs)
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Ingo Weiss <iweiss>
Component: CDI/WeldAssignee: Jozef Hartinger <jharting>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Remes <tremes>
Severity: high Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.1.0CC: iweiss, jharting, lcosti, maschmid, myarboro, pmuir, tremes, vtunka
Target Milestone: CR3   
Target Release: EAP 6.2.1   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-24 20:15:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Reproducer provided by the customer none

Description Ingo Weiss 2013-11-26 13:41:17 UTC
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

Comment 6 Tomas Remes 2014-01-30 12:27:45 UTC
I verified this in jboss-eap-6.2.1.CP.CR3-patch.

Comment 7 Lucas Costi 2014-01-31 00:51:10 UTC
Adding release note for 6.2.1