tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Angus Mezick" <amez...@guidestar.org>
Subject JDBC Session Manager
Date Wed, 25 Jun 2003 12:14:50 GMT
This is NOT about the JDBC Session Store.  I also don't think
Clustering will work because it sends mcasts at a set interval and not
When the session is done being used (i.e. the request processing is 
complete).

Ok, now that is out of the way.  I am working in an environment with a
cisco load balancer that is broken (or the sales rep lied).  I can NOT
do sticky sessions reliably to save its life.  So I implemented a
session manage in the iplanet server we were using to use a DB as a
session store.  The only sessions in memory were the ones in use.  All
sessions not associated with a currently processing request were stored
in the DB.  This allowed us to have some VERY nice clustering
functionality without having to deal with ANY stickyness.  On a request
as session was either inserted or selected from the db.  Iplanet only
called the update method once at the end of the processing of a
servlet's service method in the NSServletRunner class. (when the request
input stream is closed)  At this point the manager's update() class is
called.  This is usually an empty class.

I am wondering what the best way to implement the same functionality in
tomcat would be.  My current though is to change
core.ApplicationDispatcher.invoke() to have the session from the request
call the manager's update method. (I see a whole lot more changes in
there)  I would much rather have this event code be trapped by the
manager and then call the update.  Anyone know how to go about this?
Should I have sent this to the developer's list?

 
support.fireInstanceEvent(InstanceEvent.AFTER_DISPATCH_EVENT,
                                      servlet, request, response);


MORE INFO ON MY ENVIRONMENT:
We have some servlets that are called using <img> tags and return a
dynamically generated image.  These servlets use session data to get
some of their parameters.  This is why I need the session updated 
IMMEDIATELY on request completion.

Angus Mezick
GuideStar - Philanthropic Research Inc.
427 Scotland St.
Williamsburg, Virginia 23185
PHONE: (757)299-4631 x35  FAX:(757)229-8912
amezick@guidestar.org <mailto:amezick@guidestar.org>
www.guidestar.org <http://www.guidestar.org>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message