[
https://issues.jboss.org/browse/WFLY-1766?page=com.atlassian.jira.plugin....
]
Stuart Douglas updated WFLY-1766:
---------------------------------
Assignee: Stuart Douglas (was: jaikiran pai)
The @Local annotation on a session bean "overrides"
information about @Local interfaces implemented through keyword "implements"
--------------------------------------------------------------------------------------------------------------------------------
Key: WFLY-1766
URL:
https://issues.jboss.org/browse/WFLY-1766
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: EJB
Affects Versions: 8.0.0.Alpha3
Reporter: Matus Abaffy
Assignee: Stuart Douglas
I have the following interfaces
{code}
public interface Bar { }
{code}
{code}
@Local
public interface Foo { }
{code}
and a session bean
{code}
@Local(Bar.class)
@Stateful
public class SessionBean implements Foo { }
{code}
EJB 3.2 specification (4.9.7 Session Bean’s Business Interface) states:
"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"
Therefore, I assume SessionBean should expose both Bar and Foo as local business
interfaces. However, only Bar is exposed:
{noformat}
...
INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor]
(MSC service thread 1-7) JNDI bindings for session bean named SessionBean in deployment
unit deployment "pckg.war" are as follows:
java:global/pckg/SessionBean!org.jboss. ... .Bar
java:app/pckg/SessionBean!org.jboss. ... .Bar
java:module/SessionBean!org.jboss. ... .Bar
java:global/pckg/SessionBean
java:app/pckg/SessionBean
java:module/SessionBean
{noformat}
It seems that the @Local annotation on a session bean class "overrides" all
information about @Local interfaces implemented using the keyword "implements".
(It does not ignore @Remote interfaces implemented using the keyword
"implements".)
The @Remote annotation on a session bean class works analogically - it causes @Remote
interfaces implemented using the keyword "implements" not to be contained in the
set of remote business interfaces.
I haven't tried yet what happens if I declare another interface(s) for certain
session beans as local/remote in the deployment descriptor - whether those defined in the
java classes become "overriden". But I'd like to know what SHOULD happen. If
it is not clear from the EJB spec., the exact behaviour in such case should be stated
specifically for Wildfly - I'd be grateful for any links to such information.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira