This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Share a spring bean on a Tomcat cluster

Mar 20th, 2012, 10:21 AM

Hello,

I'm working on a java/Spring application. One bean is used to manage datas in a map and push async messages
when a data is removed from the map. This working quite well but I wonder how this can work if I have to put several tomcat in cluster on a production environment later.
Now, a synchronized method allow users to add/get/remove datas in the map (which is a field of the bean).
As it works well, I would like to know the easiest way to share this bean between several tomcat server ?