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

InfinispanSubsystemXMLReader ignores configuration attribute on cache elements

    Details

    • Steps to Reproduce:
      Hide

      1) Create local-session-configuration and local-cache that uses this configuration (see attached example.cli):

      
      ./ispn-cli.sh --file=example.cli
      
      {"outcome" => "success"}
      {"outcome" => "success"}
      {
          "outcome" => "success",
          "result" => {
              "configuration" => "example-config",
              "backup" => undefined,
              "transaction" => undefined
          }
      }
      
      

      This produces the following cache container definition in standalone.xml:

      
        <cache-container name="local" default-cache="default" statistics="true">
            <global-state/>
                <local-cache name="default"/>
                <local-cache name="namedCache"/>
                <local-cache-configuration name="example-config"/>
                <local-cache name="testCache" configuration="example-config"/>
         </cache-container>
      
      

      2) Start the server:

      ./standalone.sh
      

      3) In another console start the cli, connect to the server and read the cache resource:

      
      ./ispn-cli.sh
      
      connect
      
      ./subsystem=datagrid-infinispan/cache-container=local/local-cache=testCache:read-resource
      {
          "outcome" => "success",
          "result" => {
              "configuration" => "testCache",
              "backup" => undefined,
              "transaction" => undefined
          }
      }
      
      

      Configuration changed from example-config to testCache.
      Should be example-config as defined in standalone.xml

      Show
      1) Create local-session-configuration and local-cache that uses this configuration (see attached example.cli): ./ispn-cli.sh --file=example.cli { "outcome" => "success" } { "outcome" => "success" } { "outcome" => "success" , "result" => { "configuration" => "example-config" , "backup" => undefined, "transaction" => undefined } } This produces the following cache container definition in standalone.xml: <cache-container name= "local" default -cache= " default " statistics= " true " > <global-state/> <local-cache name= " default " /> <local-cache name= "namedCache" /> <local-cache-configuration name= "example-config" /> <local-cache name= "testCache" configuration= "example-config" /> </cache-container> 2) Start the server: ./standalone.sh 3) In another console start the cli, connect to the server and read the cache resource: ./ispn-cli.sh connect ./subsystem=datagrid-infinispan/cache-container=local/local-cache=testCache:read-resource { "outcome" => "success" , "result" => { "configuration" => "testCache" , "backup" => undefined, "transaction" => undefined } } Configuration changed from example-config to testCache. Should be example-config as defined in standalone.xml

      Description

      InfinispanSubsystemXMLReader ignores configuration attribute on local-cache elements.

      The method

      initPersistenceConfiguration(cacheConfigurationAddress, additionalConfigurationOperations);
      

      , which is called from parseLocalCache,
      adds an entry to additionalConfigurationOperations.

      This causes the method

      addCacheConfiguration(String cacheType, PathAddress containerAddress, Map<PathAddress, ModelNode> operations,
                  boolean configurationOnly, ModelNode cacheConfiguration,
                  Map<PathAddress, ModelNode> additionalConfigurationOperations, PathAddress cacheConfigurationAddress)
      

      to call

      addCacheConfiguration(String cacheType, PathAddress containerAddress, Map<PathAddress, ModelNode> operations,
                  boolean configurationOnly, ModelNode cacheConfiguration,
                  Map<PathAddress, ModelNode> additionalConfigurationOperations, PathAddress cacheConfigurationAddress)
      

      without a configurationName.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ryanemerson Ryan Emerson
                Reporter:
                latankar Oliver Lüttin
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: