Hello, I want to replicate OpenJPA (2.0.0) cache through AMQP (e.g. through RabbitMQ) and I see 2 possible ways: 1) Use implementation of RemoteCommitProvider for AMQP - as far as I know there are no any public implementations 2) Use ehcache and its AMQP replication (there is one https://github.com/jamescarr/ehcache-amqpreplication )
I've tried the second option and it doesn't work from the box - my "update" events haven't replicated between JVM's. It seems that the reason is in AbstractDataCache::recacheUpdates method which tells not to update cache if updated object is already in cache. And it seems this option is not configurable (hardcoded "return false"). And from openjpa-ehcache package (http://ehcache.org/documentation/integrations/openjpa-provider) EhCacheDataCache class also doesn't override this method. As possible solution I can inherit EhCacheDataCache, override recacheUpdates method + I need to override some code in EhCacheDerivation so that my cache is used instead of EhCacheDataCache (I haven't found a way how I can configure to use own cache implementation) - so it doesn't look as proper solution for me (though it seems it works fine). Could you provide please some ideas on what is the best solution in my situation? In the best case I would prefer not to write/override any code and only make some configuration changes. Regards, Oleg