{"id":572,"date":"2004-03-01T14:35:23","date_gmt":"2004-03-01T18:35:23","guid":{"rendered":"http:\/\/wordpress.cephas.net\/?p=572"},"modified":"2004-03-01T14:35:23","modified_gmt":"2004-03-01T18:35:23","slug":"tomcat-session-replicationclustering","status":"publish","type":"post","link":"https:\/\/cephas.net\/blog\/2004\/03\/01\/tomcat-session-replicationclustering\/","title":{"rendered":"Tomcat Session Replication\/Clustering"},"content":{"rendered":"<p>I&#8217;m considering whether or not to use the new session clustering capabilities of Tomcat 5. Unfortunately there isn&#8217;t much information out there on the subject. I found a short mention in this &#8220;<a href=\"http:\/\/www.onjava.com\/pub\/a\/onjava\/2004\/01\/28\/tomcat5.html?page=last&amp;x-showcontent=text\">What&#8217;s New in Tomcat 5<\/a>&#8221; article on OnJava and a relatively thorough article on the Tomcat site &#8220;<a href=\"http:\/\/jakarta.apache.org\/tomcat\/tomcat-5.0-doc\/cluster-howto.html\">Clustering\/Session Replication How-To<\/a>&#8220;. 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?<\/p>\n<p>I&#8217;m specifically interested in opinions on: <\/p>\n<p>a) Beyond the obvious, what are the implications of using the &#8216;useDirtyFlag&#8217; 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 &#8216;useDirtyFlag&#8217; I&#8217;ve seen yet.  For those who haven&#8217;t peeked:<\/p>\n<blockquote><p>\ntrue means that we only replicate a session after setAttribute,removeAttribute has been called.<br \/>\nfalse means to replicate the session after each request.<br \/>\nfalse means that replication would work for the following piece of code:<br \/>\n&lt;%<br \/>\nHashMap map = (HashMap)session.getAttribute(&#8220;map&#8221;);<br \/>\nmap.put(&#8220;key&#8221;,&#8221;value&#8221;);<br \/>\n%&gt;\n<\/p><\/blockquote>\n<p>Setting &#8216;useDirtyFlag&#8217; 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?<br \/>\nb) Which persistence mechanism did you choose (PersistenceManager, JDBCManager, SimpleTcpCluster)?<\/p>\n<p>Also, does anyone know if the <a href=\"http:\/\/www.oreilly.com\/catalog\/tomcat\/\">Tomcat book<\/a> 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 &amp; Noble and that only covers Tomcat 4.x.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m considering whether or not to use the new session clustering capabilities of Tomcat 5. Unfortunately there isn&#8217;t much information out there on the subject. I found a short mention in this &#8220;What&#8217;s New in Tomcat 5&#8221; article on OnJava and a relatively thorough article on the Tomcat site &#8220;Clustering\/Session Replication How-To&#8220;. Is there anyone &hellip; <a href=\"https:\/\/cephas.net\/blog\/2004\/03\/01\/tomcat-session-replicationclustering\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Tomcat Session Replication\/Clustering<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/572"}],"collection":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/comments?post=572"}],"version-history":[{"count":0,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/572\/revisions"}],"wp:attachment":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/media?parent=572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/categories?post=572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/tags?post=572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}