0 Replies Latest reply on Jul 22, 2015 3:46 AM by enrico.olivelli

    HotRod Client and store values as binary

    enrico.olivelli

      Hi,

      I'm running a setup with Java HotRod clients and a cluster of java RotRod servers. The HotRod server is running inside processes which host a Infinipan node and are attached to the cluster.

       

      When I put/get Java objects using the HotRod client the server stores the object using the Java Serialization representation of the version of the java class on the classpath of the server.

       

      In other words, if I change the class on the client-side I need to update/restart the server in order to see new fields correctly serialized/deserialized.

       

      As far as I known the storeAsBinary property need to be set to "false" with compatibiliy enabled, which in turn is needed in order to let HotRod stuff to work.

       

      Is any workaround for this ?

       

      I tried to serialize object on the client side, and then storing only byte[] on Infinispan but in some cases Infinispan "disccovers" that the byte[] contains a Java Serialized Object and deserializes it, returning back a deserialized Object to the client instead of my byte[]

       

      Thanks

      Enrico