Hello Gurus,
I have a working session persistence layer in my application.
Everything is great except one little annoyance..
My app takes advantage of Tapestry's intelligent session management,
and doesn't create one unless needed (actually Tapestry controls
that). Once session is created and pesistence enabled, my app
serializes attributes to the database. When app server on the cluster
dies, another one picks up the slack and restores the session. This is
detected when JSESSIONID cookie value is found, but a session is null.
The app server checks for the database, and if matching session id is
found, restores it and the user doesn't even know what happened.
Now, if the session simply expires and user chooses not to log back
in, but continues as a "guest", I'm gonna end up with what I call a
"stale session cookie". Currently my app takes a db hit every time
because JSESSIONID exists, yet session is null (gone, expired).
The first, and only thing I tried was to remove the cookie:
if(sDbg()) _sLog.warn("stale session cookie: " + oldSessionId);
if(!restoreSession(oldSessionId)) {
if(sDbg()) _sLog.debug("removing stale cookie: " + oldSessionId);
cookie.removeCookieValue(COOKIE_SESSION_ID);
}
But for whatever reason that does not work. It is annoying, but I
don't seem to be able to remove that cookie value. How come?
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]