synch ehcache instance

royjayd
royjayd used Ask the Experts™
on
hi guys

I have 3 application servers connected in cluster. each server has its own JVM. There is ehcache instance attached with each jvm. How will i make sure that each ehcache instance is in synch with other ehcache instance(s).

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mick BarryJava Developer
Top Expert 2010

Commented:

Author

Commented:
do you know if that is open source?
thanks
Mick BarryJava Developer
Top Expert 2010

Commented:
no it isn't
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Author

Commented:
I have a ehcahce setup in my application, right now it just caches data. Is there anyway i can save the ehcache data in database?
thanks
Mick BarryJava Developer
Top Expert 2010

Commented:
Doesn't really make sense to do that.
You've stored it in the cache to *avoid* calling the database.
Mick BarryJava Developer
Top Expert 2010

Commented:
Depending on the data you may be able to solve it by giving the data a short lifetime. That way they may get a little out of sync but not for long before they get themselves back in sync.

Author

Commented:
from this documentation http://ehcache.org/documentation/distributed_caching.html

>>>A distributed or replicated cache eliminates the per-instance overhead of loading and refreshing multiple caches from a database.
which arises the question how is ehcache and database connected?
Java Developer
Top Expert 2010
Commented:
> which arises the question how is ehcache and database connected?

because a cache is often used to cache results from a database. Reason being to reduce load on the database.

Author

Commented:
is the ehcache instance running on a jvm?..thx
Mick BarryJava Developer
Top Expert 2010

Commented:
its just a set of classes, it doesn't run seperately.
ie. the cache is part of your application

Author

Commented:
After reading the doc, i see there are two ways, one is through distributed using terracotta like you said which is not oen source and another way is using replicated mechanism. If i want to use the JMS replicated mechanism to keep instances in synch, do i have to buy any product from ehcache?

thanks
Mick BarryJava Developer
Top Expert 2010

Commented:
I think replication is available but 100% sure

Author

Commented:
objects
any help with this question greatly appreciated

http://www.experts-exchange.com/Programming/Languages/Java/Q_27060917.html

thanks for help

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial