[JBoss JIRA] (ISPN-11901) Deprecate unused encoders and media types
by Gustavo Fernandes (Jira)
[ https://issues.redhat.com/browse/ISPN-11901?page=com.atlassian.jira.plugi... ]
Gustavo Fernandes updated ISPN-11901:
-------------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Deprecate unused encoders and media types
> -----------------------------------------
>
> Key: ISPN-11901
> URL: https://issues.redhat.com/browse/ISPN-11901
> Project: Infinispan
> Issue Type: Task
> Components: Core
> Affects Versions: 11.0.0.Dev05
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 11.0.0.Final
>
>
> * {{JavaSerializationEncoder}}, {{GlobalMarshallerEncoder}}, and {{GenericJbossMarshallerEncoder}} should not be used, transcoders should do the marshalling instead.
> * {{application/x-infinispan-binary}} is no longer used for BINARY storage.
> * {{application/x-infinispan-marshalling}} should be replaced with {{application/x-jboss-marshalling}}.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (ISPN-11932) JCache remote events do not work with ProtostreamMarshaller
by Gustavo Fernandes (Jira)
[ https://issues.redhat.com/browse/ISPN-11932?page=com.atlassian.jira.plugi... ]
Gustavo Fernandes updated ISPN-11932:
-------------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> JCache remote events do not work with ProtostreamMarshaller
> -----------------------------------------------------------
>
> Key: ISPN-11932
> URL: https://issues.redhat.com/browse/ISPN-11932
> Project: Infinispan
> Issue Type: Bug
> Components: Hot Rod, JCache, Marshalling
> Affects Versions: 11.0.0.CR1, 10.1.8.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 11.0.0.Final
>
>
> JCache remote events use {{key-value-with-previous-converter-factory}}, which creates a {{KeyValueWithPrevious}} instance with the key, new value, and old value.
> The {{KeyValueWithPrevious}} protostream serialization is broken: the new and old values are both replaced by the key.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (ISPN-11926) Remote JCacheManager creates two RemoteCacheManager instances
by Gustavo Fernandes (Jira)
[ https://issues.redhat.com/browse/ISPN-11926?page=com.atlassian.jira.plugi... ]
Gustavo Fernandes updated ISPN-11926:
-------------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Remote JCacheManager creates two RemoteCacheManager instances
> -------------------------------------------------------------
>
> Key: ISPN-11926
> URL: https://issues.redhat.com/browse/ISPN-11926
> Project: Infinispan
> Issue Type: Bug
> Components: Hot Rod, JCache
> Affects Versions: 11.0.0.CR1, 10.1.8.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 11.0.0.Final
>
>
> {{org.infinispan.jcache.remote.JCacheManager}} creates two {{RemoteCacheManager}} instances, one with {{forceReturnValues(false)}} and one with {{forceReturnValues(true)}}. This is wasteful, because each {{RemoteCacheManager}} will create its own server connections and threads.
> It also breaks {{JCache}} listeners when the user explicitly sets the marshaller to {{org.infinispan.commons.marshall.ProtoStreamMarshaller}}, because {{JCacheManager}} registers the {{KeyValueWithPrevious}} marshaller (from {{GlobalContextInitializer}}) in only one of the managers.
> The test suites work by accident:
> * The {{jcache/remote}} test suite doesn't configure a marshaller, instead {{ConfigurationBuilder.build()}} creates a {{ProtostreamMarshaller}} instance (because {{jboss-marshalling}} is not on the classpath) and the next {{Configuration.build()}} call uses **the same {{ProtostreamMarshaller}} instance**, so the {{RemoteCacheManager}}s share the serialization context.
> * The {{jcache/tck-runner-remote}} test suite has {{jboss-marshalling}} on the classpath from the {{server/runtime}} dependency, so it uses {{GenericJBossMarshaller}}.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (ISPN-11899) Allow application/x-java-serialized-object media type without custom marshaller
by Gustavo Fernandes (Jira)
[ https://issues.redhat.com/browse/ISPN-11899?page=com.atlassian.jira.plugi... ]
Gustavo Fernandes updated ISPN-11899:
-------------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Allow application/x-java-serialized-object media type without custom marshaller
> -------------------------------------------------------------------------------
>
> Key: ISPN-11899
> URL: https://issues.redhat.com/browse/ISPN-11899
> Project: Infinispan
> Issue Type: Enhancement
> Components: Core
> Affects Versions: 11.0.0.Dev05
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 11.0.0.Final
>
>
> The server registers a {{JavaSerializationTranscoder}} to make {{application/x-java-serialized-object}} available as a request/storage media type.
> The core {{EncoderRegistryFactory}} registers instead a {{JavaSerializationEncoder}}, which can be used explicitly ({{cache.withEncoding(JavaSerializationEncoder.class)}}), but is not picked up automatically when the user configures storage media type {{application/x-java-serialized-object}}.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (ISPN-11898) Missing transcoder for user marshaller's media type
by Gustavo Fernandes (Jira)
[ https://issues.redhat.com/browse/ISPN-11898?page=com.atlassian.jira.plugi... ]
Gustavo Fernandes updated ISPN-11898:
-------------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Missing transcoder for user marshaller's media type
> ---------------------------------------------------
>
> Key: ISPN-11898
> URL: https://issues.redhat.com/browse/ISPN-11898
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 11.0.0.Dev05
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 11.0.0.Final
>
>
> When the user configures a custom marshaller like {{JavaSerializationMarshaller}}, the cache needs a transcoder to wrap the user marshaller and convert between Java objects and the storage media type. Of course, if the cache's storage media type is not the same as the user marshaller's media type, another transcoder will be used, but the user marshaller transcoder needs to be available.
> Currently {{EncoderRegistryFactory}} registers a transcoder wrapping the global marshaller instead, and the cache won't start:
> {code:java}
> GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder();
> gcb.serialization().marshaller(new JavaSerializationMarshaller());
> DefaultCacheManager manager = new DefaultCacheManager(gcb.build());
> ConfigurationBuilder builder = new ConfigurationBuilder();
> builder.encoding().mediaType(MediaType.APPLICATION_SERIALIZED_OBJECT_TYPE);
> manager.createCache("cache", builder.build());
> {code}
> {noformat}
> org.infinispan.commons.CacheConfigurationException: Unable to inject dependencies for component class org.infinispan.encoding.DataConversion, path org.infinispan.AdvancedCache (a org.infinispan.cache.impl.EncoderCache)
> Caused by: org.infinispan.commons.dataconversion.EncodingException: ISPN000492: Cannot find transcoder between 'application/x-java-object' to 'application/x-java-serialized-object'
> at org.infinispan.marshall.core.EncoderRegistryImpl.getTranscoder(EncoderRegistryImpl.java:64)
> at org.infinispan.encoding.DataConversion.lookupTranscoder(DataConversion.java:210)
> at org.infinispan.encoding.DataConversion.injectDependencies(DataConversion.java:185)
> at org.infinispan.encoding.CorePackageImpl$1.wire(CorePackageImpl.java:29)
> at org.infinispan.encoding.CorePackageImpl$1.wire(CorePackageImpl.java:27)
> at org.infinispan.factories.impl.BasicComponentRegistryImpl.invokeInjection(BasicComponentRegistryImpl.java:339)
> ... 45 more
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months