Solved

Share Objects at application level on clustered environment

Posted on 2014-01-05
2
383 Views
Last Modified: 2014-01-06
Dear Experts,

This might be old question, but I could not find the right solution. I have web application and deploying on WebSphere Community edition (WAS CE) server on 4 different machines for load balancing purpose.  I want to store some constant variables/objects among the four servers. I mean if I change the variable in web application on one server, same copy should be available for the web apps on other 3 servers. Since these variables/objects are not related to user session, so sticky-session will not help here. Whether JNDI is the best solution? kindly share your knowledge on any other better solutions/techniques.

Thanks in advance.
0
Comment
Question by:Gangadhara Melukote
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

Accepted Solution

by:
mccarl earned 500 total points
ID: 39758305
Depending on your exact requirements you could go down a number of different routes to get a solution.

Maybe something fairly simple like, serializing those variables/objects to either a filesysytem file (and having that file located on a shared drive, for example) or to a database, and then have the code on the 4 servers periodically check for updated values and reload.

Otherwise, you might need to look into a "distributed cache" type of solution. There are a number of different vendors for such a solution, such as...

http://ehcache.org/
http://www.hazelcast.com/
http://commons.apache.org/proper/commons-jcs/
...and many others

I can't really say more than just providing those suggestions, as that would require a lot more detail on your actual requirements, but start with looking into those (or others) and if you have further questions, post back here.
0
 

Author Closing Comment

by:Gangadhara Melukote
ID: 39760291
Thank you very much for your response. The 'hazelcast' resolved my problem!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question