]
Tomaz Cerar reassigned WFLY-9680:
---------------------------------
Assignee: Stuart Douglas
EJBs can't inherit a JDK8 default method when default
implementation is in a third interface
--------------------------------------------------------------------------------------------
Key: WFLY-9680
URL:
https://issues.jboss.org/browse/WFLY-9680
Project: WildFly
Issue Type: Bug
Components: EJB
Affects Versions: 10.1.0.Final, 11.0.0.Final
Reporter: Daniel Bildhauer
Assignee: Stuart Douglas
Attachments: ejb-in-ear.zip, wildfly-ejb-in-ear-ear.ear
Given the following class/interface inheritance structure, the interface method doMagic
could not be called from a remote view, even if there is a default implementation as given
in the mixin interface. A local call works, but the remote call fails with a message like
{code}
org.jboss.invocation.CannotProceedException: INV000002: Invocation cannot proceed (end of
interceptor chain has been hit)
{code}
Example code:
{code}
@Remote
interface MyEJBInterface {
void doMagic();
}
interface MyEJBMixin extends MyEJBInterface {
default void doMagic() { .... }
}
@Stateless
class MyEJBBean extends MyEJBMixin {
}
{code}
The problem is inside the fix for WFLY-4354 bug, which checks only for the default method
implementation in the interface declaring the method the first time but not in other
interfaces.
A example is attached and I will submitt a pull request with a fix.