EJB remote reference between different virtual machines
Joined: Nov 22, 2008
Hi! I�ve got an EJB (EJB-A) that has a business logic method that must create another EJB (EJB-B) and returns EJB-B�s remote reference. Now, I�ve got a client (CLIENT-C) that uses the EJB-A to obtain the remote reference to EJB-B throughout this business method. CLIENT-C is in a different Java Virtual Machine that EJB-A and EJB-B. It�s suppossed that CLIENT-C could now use EJB�s remote interface. How can I pass the EJB-B object�s reference between different JVM? Thankx in regards!
Joined: Sep 29, 2000
KLL, Please change your name to be compliant with JavaRanch's naming policy. Your displayed name should be 2 separate names with more than 1 letter each. We really would prefer that you use your REAL name. You can change your name: here. Folks with improper display names are not allowed to win the giveaway . Thanks, Cindy
"JavaRanch, where the deer and the Certified play" - David O'Meara
The typical way to pass around references to an EJB is with a handle. Calling mybean.getHandle() gets you a handle, and handle.getEJBObject() gets you a bean.
Joined: Aug 04, 2001
hi, i think it won't make any difference even they are in 2 different JVMs , b'coz your call is a remote call to EJB-A, and call from EJB-A to EJB-B is depends on your implementation. i.e. useing Local object or remote objects.