]
Stefano Maestri moved JBEAP-10590 to WFLY-8658:
-----------------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-8658 (was: JBEAP-10590)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: JCA
(was: JCA)
Affects Version/s: (was: 7.1.0.DR16)
Setting policy option on default policy setting for DWM does not
persist it
---------------------------------------------------------------------------
Key: WFLY-8658
URL:
https://issues.jboss.org/browse/WFLY-8658
Project: WildFly
Issue Type: Bug
Components: JCA
Reporter: Stefano Maestri
Assignee: Stefano Maestri
Priority: Minor
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:
{code:title=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
{code}
{code:title=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
}
}
}
{code}
{code:title=Set up the policy option}
/subsystem=jca/distributed-workmanager=newdwm:write-attribute(name=policy-options,value={watermark=1})
{code}
{code:title=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
}
}
}
{code}
{code:title=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
}
}
}
{code}