I’m considering whether or not to use the new session clustering capabilities of Tomcat 5. Unfortunately there isn’t much information out there on the subject. I found a short mention in this “What’s New in Tomcat 5” article on OnJava and a relatively thorough article on the Tomcat site “Clustering/Session Replication How-To“. Is there anyone out that a) has implemented it and can offer some validation that it works as advertised or b) that has more information beyond what is in the above mentioned articles?
I’m specifically interested in opinions on:
a) Beyond the obvious, what are the implications of using the ‘useDirtyFlag’ in server.xml? How much does it affect performance? Which did you decide to use and why? The comments in server.xml provide the best description of the ‘useDirtyFlag’ I’ve seen yet. For those who haven’t peeked:
true means that we only replicate a session after setAttribute,removeAttribute has been called.
false means to replicate the session after each request.
false means that replication would work for the following piece of code:
HashMap map = (HashMap)session.getAttribute(“map”);
Setting ‘useDirtyFlag’ to false sounds like it would cause a ton of extra work. Setting it to true just means you have to be more intentional when you want to save data to the session. Thoughts?
b) Which persistence mechanism did you choose (PersistenceManager, JDBCManager, SimpleTcpCluster)?
Also, does anyone know if the Tomcat book that Oreilly pushed out in June of last year covers Tomcat 5? The article above seems to imply that it does, but I looked at a hardcopy at Barnes & Noble and that only covers Tomcat 4.x.