title: In a Tomcat cluster, how to share beans in an application?
body: <p>This might sound like a dumb or a simple question, but I really have little to no experience with clustering of any kind and I'm just curious if and how a certain scenario is possible.</p>
  
  <p>Let's say I've set up a cluster of N Tomcat instances, and I've deployed my application <code>App1</code> across all N instances.</p>
  
  <p>What would I need to do to be able to have certain beans in the application - not all, but some - be "shared" across the cluster?</p>
  
  <p>i.e., if I had a bean for <code>WebsiteSettings</code>, I'd like to have some lookup process where the application could ask for the bean and be given an instance of it, and any updates to the bean's properties/values are also available to any other machines in the cluster, i.e., <code>WebsiteSettings.getGreeting()</code> would return the same value on all N machines whenever it was updated.</p>
  
  <p>Do I need to set these beans up as MBeans, and have <code>App1</code> look them up via JMX? Will Tomcat's clustering support then take care of replicating changes in the MBean to all node's in the cluster automatically?</p>