• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB remove and ejbRemove methods  RSS feed

 
mini mehta
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
What is the purpose of remove method in Entity beans and when does the container invokes ejbRemove() method.
What is the purpose of remove(Object PrimaryKey) in EJBHOme interface. Can we have ejbRemove(Object PrimaryKey) method.
Do we need to remove entity bean from the App server's memory as we do for Session beans(by calling remove method).
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The purpose of the remove() method is to remove the corresponding entry from the database or other backing data store (and remove this bean from the active state as well). And no, you can't build an ejbRemove(key) method.
Kyle
 
mini mehta
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kyle Brown:
The purpose of the remove() method is to remove the corresponding entry from the database or other backing data store (and remove this bean from the active state as well). And no, you can't build an ejbRemove(key) method.
Kyle

Kyle
Can I use remove(Object PrimaryKey) method from the EJBHome Object of my Entity bean? If I can then what does internally happens which propogates the ejbRemove() method of the bean class.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're thinking in "linear code" mode. Java has no stand-alone methods like "remove()". Every method you use is associated implicitly or explicitly with some Java class. In the case of remove(), you're telling the EJB (or to be more precisely, a remote method associated with its base class) to remove itself. You can't talk directly to the container to tell the container to remove an object.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!