• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Why so many remove()

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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.


EJBObject -> remove()



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.
 
Chetan Sahasrabudhe
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the inputs
This removes the confusion.
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No problem. Don't forget to read the specifications. They helps a lot.
 
What's wrong? Where are you going? Stop! Read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic