[infinispan-issues] [JBoss JIRA] (ISPN-11926) Remote JCacheManager creates two RemoteCacheManager instances
Dan Berindei (Jira)
issues at jboss.org
Thu May 28 09:39:48 EDT 2020
Dan Berindei created ISPN-11926:
-----------------------------------
Summary: 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: 10.1.8.Final, 11.0.0.CR1
Reporter: Dan Berindei
Assignee: Dan Berindei
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)
More information about the infinispan-issues
mailing list