We have trouble finding the correct way of injecting a SessionBean from another container.
Lets say we have two ear-files earA and earB and an shared jar:
earA
@Stateless
public class MyBean implements BeanInterface{...}
earB
@Stateless
public class OtherBean{
@Inject BeanInterface myBean;
}
apiJar
A jarfile containing BeanInterface is present in both earA and earB
We don't want to explicitly use the JNDI name via @EJB, because earB will be implemented and deployed by an external customer.
We want to make as easy as possible (and with as little knowledge of earA as possible) for earB to inject MyBean through the BeanInterface.