• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • ehcache-jmsreplication,ehcache-terracotta
  • cdennis
  • Reporter: siyer
  • April 03, 2010
  • 0
  • Watchers: 0
  • May 21, 2010
  • April 14, 2010

Description

Ehcache WAN implementation relies on jms-replication module of Ehcache.

Inorder for an element to get replicated via JMS - Element.isSerializable() needs to return true - as indicated by the following code in

A> JMSCacheReplicator.java:

if (!element.isSerializable()) { LOG.warning(“Object with key “ + element.getObjectKey() + “ is not Serializable and cannot be replicated”); return; } replicatePut(cache, element);

B> Element.isSerializable() in turn looks like:

return isKeySerializable() && (value instanceof Serializable || value == null) && elementEvictionData.canParticipateInSerialization();

C> For a Cache shared via Terracotta, elementEvictionData is implemented as org.terracotta.modules.ehcache.store.ClusteredElementEvictionData ==================================================== which should return true instead of false as in: public boolean canParticipateInSerialization() { return false; }

So basically, we need a new TIM which returns true for this method instead of the current implementation in tim-ehcache-2.0.1.5.1.jar. Else no Element can get replicated via JMS - and you end up with: “WARNING: Object with key red is not Serializable and cannot be replicated”

Comments

Fiona OShea 2010-04-13

Is this an issue?

Chris Dennis 2010-04-14

Having talked with Geert, it appears that replication of clustered caches should be supported. To that end there is no reason why canParticipateInSerialization should not return true here as the reporter suggests. Unless anyone has any objections I’m going to make the change in tim-ehcache trunk and tc-3.2.