[infinispan-dev] Reading data differs from a WAR deployment or an EAR deployment

Galder Zamarreño galder at redhat.com
Fri Sep 2 13:12:04 EDT 2011


On Sep 1, 2011, at 2:03 PM, Sanne Grinovero wrote:

> update
> it might just be a trivial error: duplicate jars on the classpath,
> make the equals fail on the key when looking up a value from the
> container.

Classic classloading problem. Instance classes are only equals if both the classname and classloader are same.

> This happened to myself once already and costed us some tear and
> blood; I'm tempted to add a check for this to log a fat warning, but
> this would have an overhead on a very hot path: to verify when the
> class instances are different if their names where actually equal, to
> be checked for each key comparison in happening during a cache lookup.
> 
> I'm thinking to add such check only if the debug/trace level are
> enabled; still that would check for the debug level potentially many
> times per query execution, do I'll check the logging level statically
> .. better than nothing.
> 
> WDYT ?

I believe that trace/debug is enabled checks in JBoss Logging are pretty fast, so that could maybe work. I'd limit it to TRACE.

> 
> Sanne
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list