« Return to Thread: Clustered Cache

Clustered Cache

by Seckin Yazan :: Rate this Message:

Reply to Author | View in Thread


Hi I am new to eclipselink.
After reading some documentation on Eclipselink's cache mechanism, it was still not clear for me to find the way of implementation of the following scenarios.
I want to use Eclipselink's clustered cache mechanism on a Glassfish cluster environment serves with two instances. Let's say Both instances do some operations on DB(update, delete etc). Instance1 inserts a record to the DB. At that point that record is stored both in application's cache and DB. How can instance1 inform instance2 about that new record so that instance2 can get that new record to its cache.? or Let's say both instance1 and instance2 has the same record on their caches and Instance1 updates the record. How can Instance2 get that record updated on its cache? The main reason of implementing such scenarios is to provide better performance by getting records from the cache rather than the DB.
For my queries i use the following hints.
hints={@QueryHint(name=QueryHints.QUERY_TYPE,value=QueryType.ReadAll),@QueryHint(name=QueryHints.CACHE_USAGE, value=CacheUsage.CheckCacheOnly)}

I would really appreciate if someone can lead me with that.
Thanks

Seckin

 « Return to Thread: Clustered Cache