title: Multiple instances of a java web application sharing a resource
body: <p>I have a web service, that takes an input xml message, transforms it, and then forwards it to another web service.</p>
  
  <p>The application is deployed to two web logic app servers for performance, and resilience reasons.</p>
  
  <p>I would like a single website monitoring page that allows two things</p>
  
  <ul>
  <li><p>ability to stop/ start forwarding of messages</p></li>
  <li><p>ability to monitor throughput of number of messages in the last hour etc. Number of different senders into the webservice etc.</p></li>
  </ul>
  
  <p>I was wondering what the best way to implement this was.</p>
  
  <p>My current idea is to have an in memory database (eg Debry or HSQL) replicating data to share the information between the two (or more) instances of my application that are running in different instances of the app server. I imagine I would have to setup some sort of master/ slave configuration.</p>
  
  <p>I would love a link to an article that discusses how to solve this problem.</p>
  
  <p>(Note, this is a simple spring application using spring MVC)</p>
  
  <p>thanks,</p>
  
  <p>David.</p>