tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Holle <je...@ptc.com>
Subject PersistentManagerBase (etc) Patches
Date Tue, 14 Dec 2004 03:47:19 GMT
A week or two ago I found I had need of the persistent session manager, 
PersistentManagerBase -- and also noticed its experimental status.

Looking at the sources I found "FIXME" comments regarding: (1) a race 
condition between session passivation and session usage and (2) a lack 
of LRU sorting to passivate oldest sessions first.  I also discovered 
that all passivated sessions are regularly (every minuted by default) 
read back into memory in their entirety to check if they should be expired.

The attached set of patches is intended to address all of these issues 
-- and seems to do so to the best of my (admittedly limited) testing.

There are additional fixes that should be made to JDBCStore (i.e. in 
general it seems to a trip to the database for every row in many cases 
where 1 per 'n' would suffice), but this was of less interest to me for 
the time being than FileStore, so I have not pursued these.  Also, I 
introduced a new attribute to PersistentManagerBase, but have not yet 
exposed it via JMX.  This is intentional at this point as I am uncertain 
as to the merits of the non-default value of this operation as of yet.

Comments and questions are welcome.  All of the patches are against 
5.0.30, but I could update them for 5.5.x if there was sufficient 
interest (e.g. if a committer was interested in committing them).

--
Jess Holle
jessh@ptc.com


Mime
View raw message