Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-11446

Always set a default request MediaType for caches

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 11.0.0.Final
    • 11.0.0.Alpha2
    • Core
    • None

      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 without the need to decorate, provided the configuration has a different MediaType than application/x-java-object

              gfernand@redhat.com Gustavo Fernandes (Inactive)
              gfernand@redhat.com Gustavo Fernandes (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: