On Jul 25, 2012, at 12:31 AM, Vladimir Blagojevic wrote:
Galder and others,
Need some help! I am looking at
https://issues.jboss.org/browse/ISPN-2138 and trying to understand what
is going on! I tried example in ISPN-2138 and I confirmed the findings.
Cool, so we have a test :)
It must be that TestEntry instances put in cache are stored as
MarshalledValues! If I try the same example with Integer - Map/Reduce in
AS works fine.
Integer is a raw type, so there's no need to wrap it around a marshalled value and
serialize it.
Remember that the whole point of marshalled values is to store custom types as binary, so
that you can lazily deserialize them on the receiver side (with the right classloader).
Mind you this is release 5.1.2 and MapReduceCommand used
to be executed at end of interceptor chain loading key/value pairs like
this:
for (Object key : keys) {
GetKeyValueCommand command =
commandsFactory.buildGetKeyValueCommand(key,
ctx.getFlags());
command.setReturnCacheEntry(false);
Object value = invoker.invoke(ctx, command);
mapper.map(key, value, collector);
}
then I am suspecting MarshalledValue is not unwrapped somehow to user
class TestEntry before being passed to Mapper! This is not how we do
things in 5.2.0Alpha2 - we use cache directly but I am unable to test
that yet in latest AS - still fighting with a build.
Fighting with a build? Finding hard to build AS7 with an Infinispan snapshot? Kinda
surprised, it's painless build these days...
If you wanna do this manually, take the AS7 distro you have and substitue these jars:
./modules/org/infinispan/cachestore/jdbc/main/infinispan-cachestore-jdbc-5.1.2.FINAL.jar
./modules/org/infinispan/cachestore/remote/main/infinispan-cachestore-remote-5.1.2.FINAL.jar
./modules/org/infinispan/client/hotrod/main/infinispan-client-hotrod-5.1.2.FINAL.jar
./modules/org/infinispan/main/infinispan-core-5.1.2.FINAL.jar
Apart from substituting the jars, make sure each module.xml points to the given jar:
./modules/org/infinispan/main/module.xml
./modules/org/infinispan/cachestore/jdbc/main/module.xml
./modules/org/infinispan/cachestore/remote/main/module.xml
./modules/org/infinispan/client/hotrod/main/module.xml
./modules/org/infinispan/main/module.xml
Regards,
Vladimir
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache