EJB programming & troubleshooting: remove on passivated bean
EJB spec 2.0 on page 79 says "If a client invokes a session object whose session bean instance has been passivated, the container will activate the instance. To activate the session bean instance, the container restores the instance’s state from secondary storage and issues ejbActivate on it." What happens when client calls remove on a passivated bean? Does the container activates the bean and then calls ejbRemove on it or it just removes the bean without activating it and calling ejbRemove?
- Posted by: abhinav chopra
- Posted on: December 16 2006 14:09 EST
The Container activates the bean then it will call ejbRemove.
The bean has to come to "Method-Ready" state before ejbRemove() is called.A passive bean comes to "Method-Ready" state when container invokes "ejbActivate" and then ejbRemove() is called. Go thru the lifecycle diagram.