> I want to store session information in a database to be shared
> between a set
> of servers in a "load balancing without session affinity" configuration.

Lacking input from others, I will answer part of my own question to possibly
help somebody else.

The result is that with a day of work it is possible to use PersistentValve
and PersistentManager to produce "load balancing without session
affinity" -- but you have to overcome some Tomcat issues in the code along
the way.  My assumption is while the code is there, it has not been use
seriously and therefore is not shaken down.

I found and fixed (or worked around) a couple of Tomcat bugs along the way.
If a Tomcat developer is interested in these, I would be glad to give more
details:

* JDBCStore read and writes the database multiple times in load() and
save().  Adding "break;" in a couple strategic places fixes this

* As far as I can tell, the "checkInterval" attribute within
PersistentManager does not work at all

* PersistentValve loads the session for all requests, even static content
(things like *.css, *.js, *.gif).  While this is not wrong, it does not work
well.  I hacked around it, but there could be a clean solution

* Session data is always written out, even when it doesn't change.  I added
a mechanism based on hashCode() to avoid this

* Deserialization errors are not handled correctly

* I could not get the logging to work so I added my own (this might just be
my problem)

- tony



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to