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

Always set a default request MediaType for caches

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 11.0.0.Dev04
    • 11.0.0.Alpha2
    • Core
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              gfernand@redhat.com Gustavo Fernandes (Inactive)
              gfernand@redhat.com Gustavo Fernandes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: