Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes EJB and other Java EE Technologies and the fly likes Reassigning an entity bean instance..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Reassigning an entity bean instance....." Watch "Reassigning an entity bean instance....." New topic

Reassigning an entity bean instance.....

J Johny Rufus
Ranch Hand

Joined: Oct 29, 2003
Posts: 47
Hi people,
Assuming that there are two EJB Objects(remote interfaces) created and there is only one entity bean instance managed by the container,
does setting the entity context for bean instance happen, when the container needs to re-assign the entity bean instance from the first EJB Object to the second ?
In the code for ejbLoad and ejbRemove, before touching the database, we get the primarykey of the current EJBObject using the ctx.getPrimareyKey.
My question is , how does this context object in the entity bean instance gets set to the current EJB Object upon which it is invoked .....
Can someone explain me the proces involved in this......
I agree. Here's the link:
subject: Reassigning an entity bean instance.....
It's not a secret anymore!