-
Enhancement
-
Resolution: Obsolete
-
Major
-
None
-
None
-
None
-
Documentation (Ref Guide, User Guide, etc.), User Experience
The current behavior if DataFormat is used is neither intuitive nor consistent to the default behavior without.
1. even if the Marshaller is set for the RemoteBuilder the DataFormat will not use it as expected
JsonClient with RCM without marshaller setting or with UTF8StringMarshaller will cause different errors if DataFormat(JSON) is used
- _type field is missed
- ClassCastException: class java.lang.String cannot be cast to class [B (java.lang.String and [B are in module java.base of loader 'bootstrap')
2. Many Marshaller can be used to store simple text if only the RemoteCacheManager set a Marshaller, by default ProtostreamMarshaller is used.
But using DataFormat with TEXT_PLAIN and ProtostreamMarshalller will be unexpected different - here client write with DataFormat but read without (but use the same marshaller)
This difference is unexpected as from a customer perspective the content should be transformed in the same way no matter whether the client uses DataFormat - the server will not use transformation - or the client simple put a String (with JSON) to the Json encoded cache - the server will transform the content with jackson-databind
3. DataFormat can set any Marshaller/MediaFormat even if the combination is not valid and lead to issues. Like ProtoStreamMarshaller, GenericJbossMarshaller and JSON MediaType
Use different marshallers (which work for text JBM ProtoSM StringM without DataFormat) will have effects to REST no longer text, and let the Console fail even if the JSON string is valid because of the different marshalling.
Expectations:
- Similar to RCM marshalling the text based content (text/json/xml) should be compatible with different Marshallers
- There should be no difference if RCM.Marshaller or DataFormat is used
- DataFormat without Marshaller setting should default to the cache marshaller
- is related to
-
ISPN-8098 Hot Rod client should auto-select marshaller based on server cache key/value types
- Closed