JBoss - Examples of twiddle

The twiddle utility that ships with JBoss is quite powerful. However, one has to struggle to find examples of how to use it.

After trying a bunch of things, here are examples of some of the command that were quite useful for me:

Deploy a WAR/EAR

twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" deploy "file:///Users/indy/Desktop/railo-jboss1.local"

Undeploy a WAR/EAR

twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" undeploy "file:///Users/indy/Desktop/railo-jboss1.local"

Add an Alias for a Web Context

twiddle.sh -s localhost:1499 invoke "jboss.web:host=a1,type=Host" addAlias railo-jboss1.local

Find Aliases for a Web Context

twiddle.sh -s localhost:1499 invoke "jboss.web:host=a1,type=Host" findAliases

I also saw the following three resources and found them quite useful:

Comments

Manoj

Manoj wrote on 06/08/09 10:02 PM

Good article thanks. But i was looking at another example of accessing the http connector bean/ajp connector bean from twiddle ? Do you have any idea how to invoke that ?
Indy Nagpal

Indy Nagpal wrote on 06/09/09 9:45 AM

Manoj, have you checked if you can do something like that from the jmx-console? Normally twiddle commands can be quite easily recreated based on the path you take in jmx-console to do a task.

Leave a comment

Tell us about yourself
(required field)
(required field)
Comment and preferences
Leave this field empty: