-
1. Re: Infinispan Rest API 1; Hotrod API 0
gustavonalle Jun 27, 2017 5:44 AM (in response to arcanemage)The Hot Rod and Rest endpoints have different expectations on how data is stored and read back, it's not possible (out-of-the box) to fully read data written by rest from Hot Rod and vice-versa.
At the moment there is no way of asking for an specific format via Hot Rod (this is work in progress), so the only way to make both endpoints work together is to enable compatibility mode, e.g.:
<local-cache name="my-cache">
<compatibility enabled="true" />
</local-cache>
-
2. Re: Infinispan Rest API 1; Hotrod API 0
arcanemage Jun 27, 2017 10:10 AM (in response to gustavonalle)Thanks for the quick reply, Gustavo.
As recommended I switched on the compatibility mode, but now the output looks like this:
============= SESSION
> key=156211
> value=[B@7921b0a2=============
Does this meant some kind of serializer/deserializer is required?
Many thanks for your response.
-
3. Re: Infinispan Rest API 1; Hotrod API 0
sebastian.laskawiec Jun 27, 2017 10:17 AM (in response to arcanemage)You will also need a custom marshaller.
-
4. Re: Infinispan Rest API 1; Hotrod API 0
gustavonalle Jun 27, 2017 11:16 AM (in response to arcanemage)What kind of objects are you writing to the cache? If you are writing strings or primitives, it should work without extra serializers/deserializers.
-
5. Re: Infinispan Rest API 1; Hotrod API 0
arcanemage Jun 27, 2017 11:51 AM (in response to gustavonalle)Hi Gustavo,
I am writing strings (XML); Content type="application/xml" -- see my original post.
Cheers
-
6. Re: Infinispan Rest API 1; Hotrod API 0
gustavonalle Jun 28, 2017 9:01 AM (in response to arcanemage)This is a bug. You should be able to get the XML from Hot Rod. Opened [ISPN-7991] Compatibility between Rest and HotRod not working on both ways - JBoss Issue Tracker
-
7. Re: Infinispan Rest API 1; Hotrod API 0
gustavonalle Jul 10, 2017 9:52 AM (in response to arcanemage)Hello arcanemage, the bug should not affect version 9.0.0.Final, but is present on 9.1.x pre-release version.
You should be able to support your use case by following the instructions on [ISPN-7991] Improve Compatibility between Rest and HotRod for text content - JBoss Issue Tracker
The extra step of creating a custom marshaller and deploying it will not be necessary in the version 9.1.0.Final, to be released this Friday.