Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-8658

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 11.0.0.Beta1
    • Component/s: JCA
    • Labels:
      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

              Assignee:
              maeste Stefano Maestri
              Reporter:
              maeste Stefano Maestri
              Tester:
              Richard Janik Richard Janik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: