Re: [Actionframework-users] severe bug in session cleanup
Status: Inactive
Brought to you by:
ptoman
From: Mark D. A. <md...@di...> - 2003-01-28 10:06:18
|
hmm, well that is kind of a hack, though it looks like it would prevent the recursion. I guess i'd suggest instead something like this: public void destroySession(String sessionId) {destroySession(sessionId, true);} protected static final CHECK_RECURSION = true; public void destroySession(String sessionId, boolean invalidate_session) { HttpSession session = (HttpSession) sessions.get(sessionId); if (session = null) return; sessions.remove(sessionId); destroySessionComponents(); if (invalidate_session) { // sanity check if (CHECK_RECURSION && Util.getStackTrace(new Exception()).indexOf("SessionObject")!=-1) log.error("ack, i am my own grandpa"); else session.invalidate(); } } then in SessionObject.valueUnbound, explicitly call destroySession(event.getSession().getId(), false) -mda ----- Original Message ----- From: "Petr Toman" <Pet...@pi...> To: <act...@li...> Sent: Monday, January 27, 2003 9:27 AM Subject: Re: [Actionframework-users] severe bug in session cleanup > >> log.error("WebSphere", new Exception()); into > >> ActionRuntime.destroySession(String) method. > > > > Sorry, not very easily. I'm doing development on Jetty, and my client > > is hosting on websphere, but I don't have websphere myself. Plus I've > > already patched the version of action servlet we are running to not > > do this. websphere is really just apache underneath, except out of > > date and with ibm's own bugs thrown in. but you could likely see this > > using tomcat, and at least then you'd have source access. > > public void destroySession(String sessionId) { > HttpSession session = (HttpSession) sessions.get(sessionId); > > if (session != null) > try { > String stack = Util.getStackTrace(new Exception()); > > if (stack.indexOf("org.actionframework." + > "ActionServlet$SessionObject") == -1) > session.invalidate(); > } catch (Throwable e) {} > > destroySessionComponents(sessionId); > sessions.remove(sessionId); > } > > Ok, would you be satisfied with something like this? If so, beta2 > could be out tomorrow! :) > > -Petr > -- > [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Actionframework-users mailing list > Act...@li... > https://lists.sourceforge.net/lists/listinfo/actionframework-users > |