This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

remove() on EJBHome of an entity bean

 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cannot understand how things work when I call remove() on an EJBHome of an entity bean.

How does the EJBHome know on which bean to call ejbRemove() ?

I understand how an EJBObject knows on what bean to call ejbRemove() when I call remove() on. After all, the EJBIbject is associated with only one bean at a time.

But I don't understand how it works with EJBHome.
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The remove methods in the EJBHome interface either takes the primary key or the ejb object handle. So, the ejb corresponding to these will be removed.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. I thought it would be like that but never was able to find a piece of code where they call remove() on the EJBHome. Can paste something here or give a link.

In Mastering EJB they talk about it as remove(), not remove(....). Quite misleading.
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thank you. I thought it would be like that but never was able to find a piece of code where they call remove() on the EJBHome. Can paste something here or give a link.


Hey, here is the javadoc for EJBHome. I dont have a code but this should give you the idea.


In Mastering EJB they talk about it as remove(), not remove(....). Quite misleading.[/QB]


I knew that you must be reading that book, i also got confused till the time i saw the api
 
Oh the stink of it! Smell my tiny ad!
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!