This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes How to maintain shared variable in a J2EE app deployed on a cluster? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to maintain shared variable in a J2EE app deployed on a cluster?" Watch "How to maintain shared variable in a J2EE app deployed on a cluster?" New topic
Author

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

Tulika Garg
Greenhorn

Joined: Mar 27, 2009
Posts: 6
Hi,

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.

Thanks,
Tuls.
Reza Rahman
author
Ranch Hand

Joined: Feb 01, 2005
Posts: 580
    
    5
Tuls,

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,
Reza


Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to maintain shared variable in a J2EE app deployed on a cluster?
 
Similar Threads
Session Timeout
Missing CharacterEncodingFilter, UrlRewriteFilter?
000-341 sample test questions
ConnectionTimeOut Vs sessionTimeout problem
How to find the number of active users logged in tomcat server