title: Looking for configuration tips to load-balance Tomcat e-commerce application
body: <p>I have an e-commerce application running on Tomcat 7 &amp; IIS 7. The souce-code is pretty large, so my overall goal is to implement some load-balancing with a minimum of change to the code. The best possible solution would be through 100% re-configuration of the servers themselves.</p>
  
  <p>My 10,000-foot view would look like this:</p>
  
  <pre><code>           [Load balancer]
             /     |       \
  [Tomcat #1]  [Tomcat #2]  [Tomcat #3]
            \      |       /
          [Hibernate cache]
                   |
           [Database Server]
  </code></pre>
  
  <p>Note 1: from past load-balancing attempts customers originating from AoL lose their session (where our shopping cart is stored) even with load-balancing configured to "sticky sessions"</p>
  
  <p>Note 2: e-commerce app uses JBoss 1.3 for its transactional support</p>
  
  <p>I am stuck on two key points:</p>
  
  <ol>
  <li>Configuring Tomcat to replicate session states among 2 or more servers (see "Note 1")</li>
  <li>Configuring Hibernate to use the same cache on all Tomcat servers</li>
  </ol>
  
  <p>Any links that hit on either of these two points would be appreciated.</p>
  
  <p>P.S. My attempts at finding info myself via Google aren't turning up anything helpful. Am I using the wrong terms to describe my solution?</p>