This content has been marked as final. Show 2 replies
It's the same as calling an EJB from a client application. I'm not very good at it, but as much as I know, you need to lookup for the EJB Home object using JNDI and obtain the Remote object from it. Then you can call all the methods on the Remote object.
If the two EJBs reside in a different container, you would need to obtain a new InitialContext by passing the environment properties of the other container and then lookup as usual.
The only precaution you need to take is that you need the EJB-client JAR (containing the home and remote interfaces only) for the other EJB available so that ClassNotFoundException and similar exceptions are not thrown.
I hope I was helpful!