Hi,
I am using the RemoteCacheManager to access a cache on my cluster. Getting an entry and
updating it on the client works no problem, however on the server, the cache receives an
entry with a byte array cache key, rather than the original string I put.
My server results in the following listener output when the cache put occurs:
DEBUG 0305-16:49:16:789 Cache (thermostatCache) entry modified: [3, 62, 4, 49, 48, 48, 48]
(local=true) {foundation.infinispan.listener.CacheLoggingListener.entryModified}
[HotRod-HotRodServerServerWorker-19]({})
DEBUG 0305-16:49:16:794 ++++ string: [B@690edaf3, new string: >1000
{foundation.infinispan.listener.CacheLoggingListener.entryModified}
[HotRod-HotRodServerServerWorker-19]({})
The cache key in question is "1000". The output above is from a cache listener
and the output is from CacheModifiedEvent.getKey(). I have some additional output to
first do a toString() on the key, and a new string decoding the byte array. There are a
few bytes prefixing the byte array which are not part of the cache key. In the cut/paste
here, there are 2 characters missing, the "new string" has 2 unprintable
character one before and one after the ">" character.
What are the extra bytes in key? Why is the key inserted as bytes and not a string?
The end effect is that my cluster cache gets a new junk entry in the cache with every
client put. I did not see any documentation where it indicated I might need a custom key
serializer. I am using strings for cache keys, nothing special.
Updating the cache from the cluster-local cache works perfectly.
Thanks,
Mark