Monday, June 10, 2013

Ways Of Using JBoss CLI

Run Batch of CLI commands 

1.Create a File with the Commands

vi createServers.txt with Contents

connect
ls

Now Execute the File using

[root@vx111a bin]# ./jboss-cli.sh --file=/soa/jboss-eap-6.1/bin/createServers.txt
core-service
deployment
deployment-overlay
extension
interface
path
socket-binding-group
subsystem
system-property
launch-type=STANDALONE
management-major-version=1
management-micro-version=0
management-minor-version=4
name=vx111a
namespaces=[]
process-type=Server
product-name=EAP
product-version=6.1.0.GA
release-codename=Janus
release-version=7.2.0.Final-redhat-8
running-mode=NORMAL
schema-locations=[]
server-state=running

JBoss CLI in non-interactive mode

[root@vx111a bin]# ./jboss-cli.sh -c --controller=127.0.0.1:9999 command="/subsystem=ejb3/thread-pool=default:write-attribute(name=max-threads,value=3000)"

{"outcome" => "success"}

Happy learning