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

Remote JCacheManager creates two RemoteCacheManager instances

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 11.0.0.Final
    • 11.0.0.CR1, 10.1.8.Final
    • Hot Rod, JCache
    • None

    Description

      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.

      Attachments

        Activity

          People

            dberinde@redhat.com Dan Berindei (Inactive)
            dberinde@redhat.com Dan Berindei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: