you can use javax.servlet.http.HttpSessionAttributeListener instead. You have to register the class in web.xml hth, Marcus
> -----Original Message----- > From: Christian Surlykke [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 30, 2006 10:52 AM > To: tapestry-user@jakarta.apache.org > Subject: Cleanup when the session expires > > > Hi > > Sorry if this has been asked before. > > Under tapestry 3.0 I had some resources attached to my visit > object that > I needed to release on session expiration. I did something like: > > public class MyEngine extends BaseEngine implements > HttpSessionBindingListener{ > public void valueUnbound(HttpSessionBindingEvent arg0) { > ((MyVisit) getVisit()).cleanup(); > } > > public void valueBound(HttpSessionBindingEvent arg0) { > } > } > > Under tapestry 4.0 this no longer works. The javadoc for > EngineManager > claims that if the engine is 'stateful' it will be stored in the > httpsession, but reading the code for EngineManager and its > implementation I could not confirm this. (Might be because of > my lack of > understanding...) > > Is there a recommended way to handle cleanup when the session is > invalidated? > > > best regards > > > Christian Surlykke > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]