hi
I'm trying to find a good approach to use a stateless session bean available in another EJB module, from a stateless session bean in the same J2EE application.
I've created a example application to show what I'm trying to do (only about 21 kB, no database required):
http://verveja.footsteps.be/~verveja/files/oracle/MultipleEJBModules-v0.01.zip
There seems to be no problem if both session beans are in the same EJB module. I can use this:
@Stateless(name="MySessionBeanAOne")
public class MySessionBeanAOneBean
implements MySessionBeanAOneLocal
{
@EJB
MySessionBeanATwoLocal fMySessionBeanATwoLocal;
// ...
}
If the session beans are in different EJB modules, this doesn't seem to work.
I've found some alternative approach (see mejbm.ejbmoduleb.MySessionBeanBThreeBean.alternativeFindMySessionBeanCFourLocal()) but this looks like it is headed for trouble if I would try to deploy it on something other than the JDeveloper Embedded OC4J Server.
question :
Could someone please suggest how I should use EJB session beans, available in different EJB modules in the same J2EE application, together?
many thanks
Jan Vervecken