Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

HELP!! Tomcat/Apache, Clustering and Static Classes...

Avatar of maclema
maclema asked on
JavaApache Web ServerJava App Servers
4 Comments1 Solution838 ViewsLast Modified:
I have a clustered application setup using Tomcat 5.5, Apache 2.3 with mod_proxy_balancer. Everything is working great.

However, I have come across an issue with static classes. I am using a static class to cache a whole bunch of strings. When certain events occur in the application I invalidate some or all of the strings cache.

The problem is that The cache is only invalidated on the current tomcat instance's JVM. Thus meaning that the cache of the other cluster members is not invalidated.

Is there some kind of mechanism for replicating static classes across clusters, or does anyone have suggestions on how I can go about creating a better caching mechanism. I really want to avoid file/database access for this caching since these string may be read thousands and thousands of times every time a page is hit. The cache needs to be shared among all users so using the session to cache the string is not an option.

Thanks,

Matt
ASKER CERTIFIED SOLUTION
Avatar of elfe69
elfe69Flag of Switzerland image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers