We recently moved to ehcache and the performance and reliability are awesome. Our main use of the cache is the invalidation strategy where when something changes with a hibernate entity, it sends out an invalidation to all other nodes in the cluster.
I'm now in the process of investigating WAN replication for hibernate cache. I have seen Terracotta's offerings, but I'm not really interested in paying for Terracotta, though I realize it may be the best solution.
I'm wondering if anyone out there has rolled their own version of this. I'm thinking data center a could have a cache listener which would then call a web service in data center b and notify it of cache items that have been invalidated.
I'd appreciate insights from anyone with experience with WAN replication especially related to hibernate cache.
I ran into the same problem, and didn't want to (nor could) use Terracotta. So I ended up creating an extension to the JMS replication in Ehcache that was more efficient at batching up events into larger groups to be sent all at once over a WAN and using SQS as the way to transmit all of this (via Nevado JMS)
https://github.com/bitsofinfo/ehcache-jms-wan-replicator