| Author |
Why so many remove()
|
Chetan Sahasrabudhe
Ranch Hand
Joined: Aug 09, 2004
Posts: 75
|
|
I am still trying to figureout why EJB specs have provided so many removes. Is it something that I might be missing in uderstanding the purpose of all removes. EJBHome -> remove(Handler handler) remove(Object object) EJBObject -> remove() EntityBean, SessionBean - > ejbRemove() that I need to implement remove in my bean class. How are all these removes used. why so many removes. secondly, for all remove HFEJB tells that call this to remove the bean. with exceptions for statless and entity beans.
|
Thanks & Regards<br />Chetan
|
 |
Poobhathy Kannan
Ranch Hand
Joined: May 26, 2004
Posts: 94
|
|
EJBHome -> remove(Handler handler),remove(Object object) -Client says to Home to remove bean which created from that home. EJBObject -> remove() -Client says to remove the bean which associated to this EJBObject
|
http://learnertobeginner.blogspot.com/
|
 |
Chengwei Lee
Ranch Hand
Joined: Apr 02, 2004
Posts: 884
|
|
EJBHome -> remove(Handler handler) remove(Object object)
For entity beans removal, the client/another bean would usually invoke the remove(Object pk) method. The primary key of an entity bean can be obtained easily via the getPrimaryKey method. Since session beans & MDB do not have any primary keys, the remove(Object pk) method obviously won't work. So another remove(Handle h) method was needed.
One of the reason that this remove method exists is that local session beans & local MDB do not have handles, that means we cannot use remove(Object pk) & remove(Handle h). If the remove method wasn't provided, they would be no way we could remove these beans! HTH.
|
SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
|
 |
Chetan Sahasrabudhe
Ranch Hand
Joined: Aug 09, 2004
Posts: 75
|
|
Thanks for the inputs This removes the confusion.
|
 |
Chengwei Lee
Ranch Hand
Joined: Apr 02, 2004
Posts: 884
|
|
No problem. Don't forget to read the specifications. They helps a lot.
|
 |
 |
|
|
subject: Why so many remove()
|
|
|