Saqib Ali
Saqib Ali

Reputation: 4400

cleanest way to restart jboss using a script

I am using " ./standalone.sh -c standalone-full.xml " to start JBOSS. What is the cleanest way to restart jboss in this case? Any scripts that you can share?

Upvotes: 27

Views: 47858

Answers (2)

Petr Mensik
Petr Mensik

Reputation: 27496

You have to use CLI console. To restart, type

bin/jboss-cli.sh --connect --command=:reload

To shutdown, type

bin/jboss-cli.sh --connect --command=:shutdown

Source

Upvotes: 30

wbdarby
wbdarby

Reputation: 1149

@Petr Mensik's solution works well if you need to shutdown the server. But if you need to restart it in a single operation you can use:

jboss-cli.sh -c ":shutdown(restart=true)"

Thanks to these excellent JBoss notes.

Upvotes: 31

Related Questions