I read some articles that come from internet, but sometimes their difference in describing some concept really confuses me.hope to get clear after client invokes the remove method within Home interface , does the entity bean firstly go into passivate? what are the steps of entity ejb when client call its remove method?
Hi there. No! As far as I can tell from my SCEA notes, the sole purpose of calling a remove method (be it from on a home interace or a remote or local interface) is to remove some specific entity data from the underlying persistent store (database). Once that data has been removed, then you can no longer have an entity bean that represents that data. Passivating an entity bean is a technique used by the container to manage pooling and load balancing. A container passivates a bean instance in order to free up resources, but still save the state of that bean to be activated and used at some point in the future. If you are destroying the data that a bean represents, then it makes no sense to first store away that bean's state for future use! The CMP and BMP entity bean sequence diagrams (Mastering EJB 2, Appendix E) show all the actions and parties involved in both bean passivation and removal - they should help explain this. Cheers, Andy [ February 09, 2003: Message edited by: Andrew Turnbull ]