Java Reference
In-Depth Information
Deploying to a single server group
The other option lets you perform a selective deployment of your application only on the
server groups you indicate:
[domain@localhost:9990 /] deploy application.ear
--server-groups=main-server-group
You are not limited to a single server group, and you can separate multiple server groups
with a comma (
,
). For example, refer to the following code:
[domain@localhost:9990 /] deploy application.ear
--server-groups=main-server-group,other-server-group
Successfully deployed application.ear
The tab completion feature will help you to complete the value for the list of
--server-
groups
selected for deployment.
Now, suppose we want to undeploy the application from just one server group. In this
case, there can be two possible outcomes. If the application is available just on that server
group, you will successfully complete the undeployment as shown in the following com-
mand:
[domain@localhost:9990 /] undeploy wflyproject.war
--server-groups=main-server-group
On the other hand, if your application is available on other server groups, the following
error will be returned by the CLI:
Undeploy failed: {"domain-failure-description" =>
{"Composite operation failed and was rolled back. Steps
that failed:" => {"Operation step-3" => "Cannot remove
deployment wflyproject.war from the domain as it is still
used by server groups [other-server-group]"}}}
It seems that something went wrong. As a matter of fact, when you are removing an ap-
plication from a server group, the domain controller will verify that any other server group
will not refer to the application; otherwise, the previous command will fail.