I have a stateless EJB SessionBean with bith @local and @remote annotations. The code is working fine in weblogic server. However on deploying it to Websphere it gives following exception.
bm.ejs.container.EJBConfigurationException: BUSINESS_INTERFACE_DESIGNATED_AS_BOTH_REMOTE_AND_LOCAL: 'oracle.odc.session.ODCSession'
The oracle.odc.session.ODCSession business interface class cannot be both remote and local.
Is there any workaround available to make it work without writing seperate EJBs for remote and local invocation?
One workaround is to have a base interface with the method declarations & then have a local interface & a remote inteface, which extend the base interface, e.g.
public interface MyEJBBase {
public void foo();
public void bar();
}
@Local
public interface MyEJBLocal extends MyEJBBase {}
@Remote
public interface MyEJBRemote extends MyEJBBase {}