• Post Reply Bookmark Topic Watch Topic
  • New Topic

Handles In EJB

 
Bish Ach
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, Can any one make me clear the "concept" of Handle in EJB?
Thnx In Advance...
Bish
[ October 17, 2003: Message edited by: Bish Ach ]
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An EJB Handle is a serializable reference to an EJB. You can write the handle to a disk, go for coffee, read the handle from disk, ask for the EJB reference, and invoke methods on the EJB. No lookup hassle.
 
sabuj paul
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the handle here means copying the original object to another new object and play with this new object , so that it wont effect the original object..correct me if i m wrong..
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not quite. The handle can be used to create multiple references to the EJB, but it's still one and the same. The only thing you have copied is the reference. Any changes through the second reference will affect the state experienced through the first reference.
 
sabuj paul
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lesse i think the modifcation of the handle doesnot affect the original object...can anyone share some view on this..
 
Dana Hanna
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He didn't say modification to the handle, but rather modification to the EJBObject obtained from the handle. And - He is correct.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!