Reputation: 425
Subsystem in question is :
<subsystem xmlns="urn:jboss:domain:jca:1.1">
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
<bean-validation enabled="true"/>
<default-workmanager>
<short-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</short-running-threads>
<long-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</long-running-threads>
</default-workmanager>
<cached-connection-manager/>
</subsystem>
I want to modify 3 properties : core-threads count, queue-length count and max-threads count under both <short-running-threads>
and <long-running-threads>
using jboss cli.
Can anyone please provide the cli to modify these properties ?
Upvotes: 0
Views: 863
Reputation: 425
As @Frito suggested our final cli looks like below :
# Batch script to modify thread count configuration in the JBoss server
# Connect to JBoss
connect
# Start batching commands
batch
#Modify short-running-threads
/subsystem=jca/workmanager=default/short-running-threads=default/:write-attribute(name=core-threads,value=200)
/subsystem=jca/workmanager=default/short-running-threads=default/:write-attribute(name=queue-length,value=200)
/subsystem=jca/workmanager=default/short-running-threads=default/:write-attribute(name=max-threads,value=200)
#Modify long-running-threads
/subsystem=jca/workmanager=default/long-running-threads=default/:write-attribute(name=core-threads,value=200)
/subsystem=jca/workmanager=default/long-running-threads=default/:write-attribute(name=queue-length,value=200)
/subsystem=jca/workmanager=default/long-running-threads=default/:write-attribute(name=max-threads,value=200)
# Reload to appy changes
:reload
# Run the batch commands
run-batch
Standalone.xml snippet after executing the cli :
<subsystem xmlns="urn:jboss:domain:jca:1.1">
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
<bean-validation enabled="true"/>
<default-workmanager>
<short-running-threads>
<core-threads count="200"/>
<queue-length count="200"/>
<max-threads count="200"/>
<keepalive-time time="10" unit="seconds"/>
</short-running-threads>
<long-running-threads>
<core-threads count="200"/>
<queue-length count="200"/>
<max-threads count="200"/>
<keepalive-time time="10" unit="seconds"/>
</long-running-rhreads>
</default-workmanager>
<cached-connection-manager/>
</subsystem>
Upvotes: 1
Reputation: 446
I guess you want to change the defaults, not the counts. Counters are actual values used for monitoring, not intended to be set.
Try with jboss-cli
within the JBoss bin
directory.
1.) Call ./jboss-cli.sh -c
. The CLI supports context sensitive command completion on every part of the command.
or
2.) Call ./jboss-cli.sh --gui
. Use the GUI to navigate to the JCA subsystem down to the needed attribute. You can change it with one mouse click using the write-attribute
context menu entry. After setting the new value, the matching CLI command is shown in a textfield on top of the GUI, ready for copy/paste.
This is an example for setting a default value:
/subsystem=jca/workmanager=default/long-running-threads=default/:write-attribute(name=core-threads,value=200)
Upvotes: 2