
JBoss 7.2 CLI を使用してサーバー グループを停止できます。
jboss_cli -c "/server-group=MyServerGroup :stop-servers(blocking=true)"
HTTP REST API 経由でこれを実行するにはどうすればよいですか?
答え1
サーバーを停止します:
curl --digest http://localhost:9990/management --header "Content-Type: application/json" -u user:password -d '{"address":[{"server-group":"MyServerGroup"}],"operation":"stop-servers","blocking":true}'
サーバーを起動します:
curl --digest http://localhost:9990/management --header "Content-Type: application/json" -u user:password -d '{"address":[{"server-group":"MyServerGroup"}],"operation":"start-servers"}'