Hi all,
I'm using an Infinispan Replicated cache with WildFly Beta 1. It happen that when I get a value from cache after a redeploy a get a ClassCastException:
a.b.C cannot be cast to a.b.C.

Certainly this is for modular class loader of WildFly.

Now I resolved the issue cloning the object on ClassCastException:

try {
AuthUserEntry authUserEntry = getCache().get(key);
return authUserEntry;
} catch (ClassCastException e) {
return DeepCopy.copy(getCache().get(key));
}

Not so elegant, but it works.
There is a better solution?

Thank you,
Domenico