Java Reference
In-Depth Information
[domain@localhost:9999 /] undeploy
application.ear
--server-groups=main-server-group --keep-content
Successfully undeployed application.ear.
Creating CLI scripts
As a program developer, you might be interested to know that the CLI is able to ex-
ecute commands in a non-interactive way, by adding them in a file, just as a shell
script. In order to execute the script, you can launch the CLI with the --file para-
meter as in the following example (for Windows):
jboss-cli.bat --file=test.cli
The equivalent command for Unix users will be:
./jboss-cli.sh --file=test.cli
In the next section, we will add some useful scripts that can be added to your admin-
istrator toolbox.
Deploying an application to several JBoss AS 7 nodes
The earlier JBoss AS releases used to ship with a farm folder, which would trigger
a deployment to all nodes that are part of a JBoss cluster. This option is not included
anymore with JBoss AS 7, but resurrecting a farm deployment is just a matter of a
few CLI instructions.
In the following example, we are deploying an application to the default server ad-
dress ( 127.0.0.1 and port 9999 ) and to another server instance that is bound to
the same address but to port 10199 :
connect
deploy /usr/data/example.war
connect 127.0.0.1:10199
deploy /usr/data/example.war
Search WWH ::




Custom Search