Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to maintain shared variable in a J2EE app deployed on a cluster?

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am new to J2EE technology and I am writing this J2EE application where I am using stateless session beans to implement few services. This application will run on a cluster of app servers. I need to add MBeans to monitor few resources. One of these resources is "session timeout value". I want to provide an MBean using which I can get the current session timeout value and also set it to desired value.
My query is how should I store this session timeout value so that its available to all the beans running on different nodes in the cluster and any change in its value is reflected in all the nodes.

Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Look into a clustered cache like JBossCache. In EJB 3.1 you will be able to use clustered singletons (not available yet).

Hope it helps,
Ruth Stout was famous for gardening naked. Just like this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic