• Post Reply Bookmark Topic Watch Topic
  • New Topic

remove() on entity beans  RSS feed

 
paul wheaton
Trailboss
Posts: 22531
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that remove() on a session bean is supposed to tell the EJB server that you are done with the bean and the server can move it back to the pool.
I thought remove() on an Entity bean indicated that you want to delete the persistance of the object (probably delete the row in the table that the entity bean represents).
How do you tell an entity bean that you are done with it, but don't delete the persistance?
 
Linuz
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I belive that the ejbPassivate() method does that...
Moving the ejb out of the pool that is.
 
mcd
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ejbPassivate can only be called by the container, AFAIK. The unsetEntityContext should do the trick.
mcd
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Linuz and mcd",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with new names which meet the requirements.
Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!