tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Frazer" <richa...@haht.com>
Subject [TC4] Proposed change to Session interface
Date Mon, 05 Mar 2001 16:07:53 GMT
Hello,

I've been working lately on integrating Tomcat into our server.  In order to
do so, we need to generate our own session ids.  Therefore we need our own
Manager implementation.

Since we've got our own Manager, we'd like to assign that Manager to the
Engine or the Host instead of to each Context like Tomcat does by default.
This way we can construct the Manager ourselves and assign it and let all
the Contexts inherit it without changing any Tomcat code.  The problem,
however, is in the StandardSession code, where it fires off the
ContextListeners during session creation, session change, and session
termination.  The code in StandardSession assumes that the Container of its
Manager is a Context, when this is not an obvious restriction.  In fact, the
code supports any Container holding a Context.  Then, all of its children
inherit it.

I would like to propose a change to the Session interface to assign a
Context to it (setContext(), getContext()).  A session is logically mapped
to a Context, so this is not a drastic change.  Also, the listeners on the
Context can be fired without worrying about a ClassCastException.  Two
changes would have to happen.  The ContextListeners would be fired from
setContext() instead of setId(), and the Request object would have to call
setContext() after it calls createSession().

I can send some diffs out if anybody is interested.

Regards,
Richard


Mime
View raw message