Call another EJB

From CodeCodex

Implementations[edit]

Java[edit]

InitialContext ctx = new InitialContext();
Object objref = ctx.lookup("MyPackage/MyEJB");
MyEJBHome home = (MyEJBHome)
   PortableRemoteObject.narrow(objref, MyEJBHome.class);
return (MyEJB) home.create();