In one of my application, I would like to capture the session timeout (HttpSession). Right now I don't have flexibilty of using session listners...
On session timeout I need to do some cleanup activity...
In this case if I use statefule session bean and capture the timeout event of the bean will help me? Does any call back method will be called on timeout of session bean?
If you want to capture the http session timeout, then write a class which implements javax.servlet.http.HttpSessionBindingListener
Then, when the session is created, put an instance of your class in the session.
The method valueUnbound() of the instance will be called when the http session is invalidated (including invalidation because of timeout)