[
https://issues.redhat.com/browse/WFLY-13360?page=com.atlassian.jira.plugi...
]
Carlo de Wolf edited comment on WFLY-13360 at 7/23/20 7:54 AM:
---------------------------------------------------------------
EJB B does not need to implement business interface explicitly, it just won't expose
the views defined in EJB A.
{panel:title=EJB 3.2 4.9.2.1}
A session bean class is permitted to have superclasses that are themselves session bean
classes. However, there are no special rules that apply to the processing of annotations
or the deployment descriptor for this case. For the purposes of processing a particular
session bean class, all superclass processing is identical regardless of whether the
superclasses are themselves session bean classes. In this regard, the use of session bean
classes as superclasses merely represents a convenient use of _implementation
inheritance_, but does not have _component inheritance semantics_.
{panel}
was (Author: wolfc):
EJB B does not need to implement business interface explicitly, it just won't expose
the views defined in EJB A.
{panel:title=EJB 3.2 4.9.2.1}
A session bean class is permitted to have superclasses that are themselves session bean
classes. How-
ever, there are no special rules that apply to the processing of annotations or the
deployment descriptor
for this case. For the purposes of processing a particular session bean class, all
superclass processing is
identical regardless of whether the superclasses are themselves session bean classes. In
this regard, the
use of session bean classes as superclasses merely represents a convenient use of
_implementation inher-
itance_, but does not have _component inheritance semantics_.
{panel}
Log INFO message when EJB does not implement Business interface
---------------------------------------------------------------
Key: WFLY-13360
URL:
https://issues.redhat.com/browse/WFLY-13360
Project: WildFly
Issue Type: Enhancement
Components: EJB
Reporter: Panagiotis Sotiropoulos
Assignee: Panagiotis Sotiropoulos
Priority: Major
From the specification every business interface need to be declared explicitly as a
business interface by @Remote or @Local annotation or deployment descriptor.
{code}
EJB 3.2 specification
4.9.7 Session Bean’s Business Interface
- The bean class must implement the interface or the interface must be designated as a
local or remote business interface of the bean by means of the Local or Remote annotation
or in the deployment descriptor.
- All business interfaces must be explicitly designated as such if any of the following
is true:
- the bean exposes a no-interface view
- any interface of the bean class is explicitly designated as a business interface of
the bean by either of the following means:
- using the Local or Remote annotation with a non-empty value on the bean class
- using the Local or Remote annotation on the interface
- in the deployment descriptor
{code}
If EJB A implements I and EJB B extends A , EJB B must also declare it implements I in
order to be spec compliant:
{code}
public interface I {...}
@Stateless
public class A implements I {...}
@Stateless
public class B extends A {...}
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)