When ejbRemove() is called : If it is a stateful bean in active state, ejbRemove() will be called when the bean times out .. (note :if the container finds the bean in passivated mode, the container WILL NOT CALL ejbRemove(). In this case the bean will be sent straight to the Garbage Collector. )
When ejbPassivate() is called : while the stateful session bean is in active state,the container may decide to passivate it (i.e call ejbPassivate())if there is need to manage the resources (provided no client is executing a call on that bean currently)..
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop