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.
Let's say I've set up a cluster of N Tomcat instances, and I've deployed my application App1
across all N instances.
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?
i.e., if I had a bean for WebsiteSettings
, 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., WebsiteSettings.getGreeting()
would return the same value on all N machines whenever it was updated.
Do I need to set these beans up as MBeans, and have App1
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?