JBoss - Deploying WAR/EAR from command line

Today I needed to deploy an application that lived outside the usual deploy folder. I also needed the ability to deploy/undeploy that application without actually having to restart the JBoss instance.

The jmx-console provides the ability to deploy/undeploy apps. But to do it from the command line, I used the twiddle utility that lives in the bin folder.

Deploying an application can be accomplished by:

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

And undeploying an application can be accomplished by:

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

This is quite an elegant solution if you need to do something like this.

Comments

denny

denny wrote on 06/05/09 6:56 AM

That is quite elegant, and even more useful. =)

Excellent tip! Thanks for letting me know it exists.

Leave a comment

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