I'm attaching code for a simple test case that demonstrates the problem. There are two web applications A and B used to put and get from cache respectively. There is also a shared class Foo that is to be cached. I've included my standalone-preview-ha.xml as well; the only addition should be for the cache container entry. I've tried local-cache, distributed-cache and replicated-cache with equivalent results.
Instructions for invoking the servlets can be found in readme.txt in the archive root.