Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-10545

Setting policy option on default policy setting for DWM does not persist it

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 7.1.0.DR18
    • 7.1.0.DR16
    • JCA
    • None

    Description

      Default distributed workmanager policy setting is WATERMARK. When the policy is not explicitly set to WATERMARK, setting up policy options for it won't persist the options and these will disappear after server reload. XML config does not contain the policy element or the policy-options.

      When policy is explicitly set up (via a CLI command for example), the policy options will persist. XML config shows the policy element and policy-options.

      Example:

      Set up DWM, don't explicitly specify policy
      batch
      /subsystem=jca/distributed-workmanager=newdwm:add(name=newdwm)
      /subsystem=jca/distributed-workmanager=newdwm/short-running-threads=newdwm:add(queue-length=10,max-threads=10)
      /subsystem=jca/bootstrap-context=customContext1:add(name=customContext1,workmanager=newdwm)
      run-batch
      reload
      
      Check the config, we're using WATERMARK
      /subsystem=jca/distributed-workmanager=newdwm:read-resource
      {
          "outcome" => "success",
          "result" => {
              "elytron-enabled" => false,
              "name" => "newdwm",
              "policy" => "WATERMARK",
              "policy-options" => undefined,
              "selector" => "PING_TIME",
              "selector-options" => undefined,
              "long-running-threads" => undefined,
              "short-running-threads" => {"newdwm" => undefined},
              "statistics" => {
                  "local" => undefined,
                  "distributed" => undefined
              }
          }
      }
      
      Set up the policy option
      /subsystem=jca/distributed-workmanager=newdwm:write-attribute(name=policy-options,value={watermark=1})
      
      Read the config again, everything looks OK
      /subsystem=jca/distributed-workmanager=newdwm:read-resource
      {
          "outcome" => "success",
          "result" => {
              "elytron-enabled" => false,
              "name" => "newdwm",
              "policy" => "WATERMARK",
              "policy-options" => {"watermark" => "1"},
              "selector" => "PING_TIME",
              "selector-options" => undefined,
              "long-running-threads" => undefined,
              "short-running-threads" => {"newdwm" => undefined},
              "statistics" => {
                  "local" => undefined,
                  "distributed" => undefined
              }
          }
      }
      
      Reload and read the config yet again, policy option is gone
      reload
      /subsystem=jca/distributed-workmanager=newdwm:read-resource
      {
          "outcome" => "success",
          "result" => {
              "elytron-enabled" => false,
              "name" => "newdwm",
              "policy" => "WATERMARK",
              "policy-options" => undefined,
              "selector" => "PING_TIME",
              "selector-options" => undefined,
              "long-running-threads" => undefined,
              "short-running-threads" => {"newdwm" => undefined},
              "statistics" => {
                  "local" => undefined,
                  "distributed" => undefined
              }
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              smaestri@redhat.com Stefano Maestri
              rjanik@redhat.com Richard Janik
              Richard Janik Richard Janik
              Richard Janik Richard Janik
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: