• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About Handle & Remote Object Reference

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In EJB Client we can get Handle object from EJBObject interface
and pass it to different JVM to rebind the EJBObject in the server,
EJBObject remote reference can also be passed to different server.
what's difference between to hold Handle or Remote Object Reference??
Thank's a lot ^_^!
[ October 28, 2003: Message edited by: ericlee ]
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJBHandle is serializable.
 
ericlee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradeep Bhat:
EJBHandle is serializable.


thank's for your reply ^_^
but,Remote Object Reference (Stub) is serializable too!!!
[ October 28, 2003: Message edited by: ericlee ]
[ October 28, 2003: Message edited by: ericlee ]
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy -- if I understand your question, the EJBObject reference *can* be passed as part of a remote method call, so that means it *can* be passed into a different JVM, but that is a runtime thing, guaranteed by normal RMI semantics.
BUT... there is no guarantee that you can serialize the remote reference, say, email it to somebody, and have them deserialize it into something they can use later to re-establish a connection to the server. The vendor is free to implement the remote reference any way that it likes (it isn't *required* to use rmic-generated stubs, for example), and while with many servers you CAN serialize and re-use the EJBObject reference as you would a Handle, it just isn't guaranteed. Handles exist as a *guaranteed* portable way to get back something that *behaves* as though it were your original reference.
I hope that makes sense.
cheers,
Kathy
 
ericlee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Kathy Sierra:
Howdy -- if I understand your question, the EJBObject reference *can* be passed as part of a remote method call, so that means it *can* be passed into a different JVM, but that is a runtime thing, guaranteed by normal RMI semantics.
BUT... there is no guarantee that you can serialize the remote reference, say, email it to somebody, and have them deserialize it into something they can use later to re-establish a connection to the server. The vendor is free to implement the remote reference any way that it likes (it isn't *required* to use rmic-generated stubs, for example), and while with many servers you CAN serialize and re-use the EJBObject reference as you would a Handle, it just isn't guaranteed. Handles exist as a *guaranteed* portable way to get back something that *behaves* as though it were your original reference.
I hope that makes sense.
cheers,
Kathy


Oh!!!Thank Kathy
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

while with many servers you CAN serialize and re-use the EJBObject reference as you would a Handle, it just isn't guaranteed.


Why is there no guarantee?
 
reply
    Bookmark Topic Watch Topic
  • New Topic