Bryan,
I wonder if the way I am doing it is causing a problem.
My application can logout the user in two ways, the usual way (logout page) and internally based on application state. (this is by design and required) for whatever reason I have the logout logic in the Visit object. It was like this:
// This will invalidate the session
IEngineServiceView engine = (IEngineServiceView)cycle.getEngine();
try {
logDebug("Calling RESTART");
engine.restart( cycle );
}catch(IOException e) {
logError("Logout Exception:",e);
}
ooh, never the mind, I noticed that I am catching only an IOException ...
Anyway I was wondering if the way I am doing it is wrong?
Does the cycle.getEngine() return the same engine instance as calling getEngine() in the page() ?
thanks again
Doug
On Wed, 13 Apr 2005 20:15:59 -0400 "Bryan Lewis" <[EMAIL PROTECTED]> wrote:
Oops, sorry about that. It doesn't need to go in a custom Engine class,
that's just where I put mine. For trying it out you could simply put the
method in your page class, like this:
public void endSession(IRequestCycle cycle)
{
try {
getEngine().restart(cycle);
}
catch (Exception ex) {
// Ignore it if the session was already invalidated.
log.debug(ex.getMessage());
}
}
----- Original Message ----- From: "LOCHART,DOUGLAS E" <[EMAIL PROTECTED]>
To: "Tapestry users" <tapestry-user@jakarta.apache.org>; "Tapestry users"
<tapestry-user@jakarta.apache.org>
Sent: Wednesday, April 13, 2005 6:44 PM
Subject: Re: Logout question - Session Already Invalidated
Bryan,
Thanks. I would ask one more thing. I am still green
(less than 2 months) and I have not attempted (or had the
need to) write my own engine. I do have the TIA book.
Could you tell me what engine you are talking about and
point me to an example (either in the book or elsewhere).
Thanks, I appreciate the help.
I still would like to know what would cause this.
---------------------------------------------------------------------
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]