Gustavo Fernandes created ISPN-11446:
----------------------------------------
Summary: Always set a default request MediaType for caches
Key: ISPN-11446
URL:
https://issues.redhat.com/browse/ISPN-11446
Project: Infinispan
Issue Type: Enhancement
Components: Core
Affects Versions: 11.0.0.Alpha2
Reporter: Gustavo Fernandes
Assignee: Gustavo Fernandes
*Background*: when a cache is created, it does not have a default request type inside its
internal Key/Value DataConversion objects, so no transcoding will be attempted during its
operations.
When decorated with _{{.withMediaType(MediaType key, MediaType value)}}_, a new cache
instance is produced setting the request type internally, and all operations will be
converted from the storage media type to this request media type (when reading), or from
the request media type to storage media type (when writing).
*Drawback*: When a cache is used through any remote endpoint, it is always decorated
since remote clients are able to communicate the request format, but when a cache is used
directly in the same JVM the request type is _null_, so no transcoding is done, unless the
cache is decorated with the required type.
*Change*: This issue will change the default request type for all caches to
_{{application/x-java-object}}_, so transcoding can be done in embedded caches as well,
without the need to decorate: it's enough to set the storage type in the
configuration.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)