• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

EJB remote reference between different virtual machines

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 3064
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic