Is it possible mark one EJB3 interface with both @Local and @Remote annotations?
Issue
Is it possible mark one EJB business interface with both @Local and @Remote annotations? I created a Stateless Session Bean and added both annotations like the example below:
@Local
@Remote
public interface TestingIF {
void test();
}
But I got the following error:
Caused by: java.lang.RuntimeException: @Remote and @Local may not both be specified on the same interface "interface org.domain.siqsystems.session.TestingIF" for EJB "TestingBean" per EJB3 Spec 4.6.6, Bullet 5.4 [EJBTHREE-751]
at org.jboss.ejb3.proxy.factory.ProxyFactoryHelper.getLocalAndBusinessLocalInterfaces(ProxyFactoryHelper.java:233)
at org.jboss.ejb3.proxy.factory.ProxyFactoryHelper.getLocalBusinessInterfaces(ProxyFactoryHelper.java:535)
at org.jboss.ejb3.session.SessionContainer.resolveBusinessInterfaces(SessionContainer.java:202)
at org.jboss.ejb3.EJBContainer.instantiated(EJBContainer.java:1665)
at org.jboss.ejb3.session.SessionContainer.instantiated(SessionContainer.java:192)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:728)
... 40 more
Environment
JBoss Enterprise Application Platform all versions
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.