This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
hai, ejbRemove() is called for session beans every time the container destroyes the bean. So you can use this method to do the stuff you typically would do in unsetEntityContext(). For entity beans ejbRemove() is only called if the user explicitly deletes the bean. I think that is the reason why the engineers at SUN invented the unsetEntityContext() for this kind of bean.
Hi, then can i know how to manually call unsetEntityContext? I dont want to call ejbRemove but my ejbRemove will delete the actual data in database. What i want is to manually destroy the entity object in memory. So can i call unsetEntityContext? And how to call it?
unsetEntityContext is a container callback method. So u can not explicitly call it. the container calls it when the bean instance is to be destoyed from the memory. It does not mean that the bean is deleted from database. Container only dis-associates the bean instance and destroys the instance. Correct me if i am wrong.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: unsetEntityContext and no unsetSessionContext