You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christian Surlykke <cp...@dsb.dk> on 2006/05/30 10:51:48 UTC

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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org