There are many ways to do this, the most common and simplest is using a
simple pageValidate, but if you need something more complex for whatever
reason, you can also wire a listener using hivemind or even use your
web.xml file
i.e.
web.xml
<listener>
<listener-class>
com.test.application.SessionListener
</listener-class>
</listener>
public class SessionListener implements
HttpSessionListener,HttpSessionAttributeListener {
}
or using hivemind:
<implementation service-id="tapestry.error.StaleSessionExceptionPresenter">
<invoke-factory>
<construct class="application.StaleSessionListener"></construct>
</invoke-factory>
</implementation>
public class StaleSessionListener implements StaleSessionExceptionPresenter{
public StaleSessionListener(){
}
public void presentStaleSessionException(IRequestCycle cycle,
StaleSessionException exception) throws IOException {
System.out.println("a stale session was detected");
}
}
Regards
Peter
Kevin Whitley wrote:
Is there some way to receive notification that a session has become
stale? I'm looking for something like the javax.servlet interface
HttpSessionBindingListener. I have various resources associated with
a session and I'd like to free them up when the session times out not
waiting for somebody to hit the session (and notice it is stale).
Thanks,
Kevin Whitley
podtech.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Peter Stavrinides
Albourne Partners (Cyprus) Ltd
Tel: +357 22 750652
If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]