My bad, i missed out the timeout for stateful session beans. Been sometime since i worked on EJBs, but thought i still had some connect. Sadly, i was wrong
Originally posted by Rahul Bhattacharjee:
During runtime exception the ejbRemove is not called , even during server crash the ejbRemove is not called and off course during timeout in passivated state, the ejbRemove is not called.
Yeah, these things are clearly mentioned in the specs.
I think in case of a runtime exception, since the bean is in an unusable state, it doesnt make sense to call ejbRemove.
In case of a server crash, only god can save the bean
In case of passivated bean, i think it is acceptable, since before passivation, ejbPassivate would have been called and any resources used by the bean should have been released.
I think here lies the difference between http session passivation and ejb passivation. Since, there is a callback on passivation of bean by the container and not so in the case of http session, so i think it will be ruthless to simply remove the session without even informing the listener. Atleast the application should have some info about when the session is removed if not when passivated.
Also, passivation not being a formal contract between the container and the application, so there should not be any deviation between timeout during passivation and the normal path.