I am trying to use the Wildfly 9 native management API to show me the status of my deployed apps. The jboss-cli execution and result is below:
jboss-cli.sh --connect --controller=myserver.com:9990 --commands="/deployment=my-deployment.war :read-attribute(name=status)"
{
"outcome" => "success",
"result" => "OK"
}
Using the code below, I am able to determine if the apps are enabled, but not if they are up and running:
ModelNode op = new ModelNode();
op.get("operation").set("read-children-names");
op.get("child-type").set(ClientConstants.DEPLOYMENT);
Can anyone assist in translating my jboss-cli commands into Java? I've tried hooking into the deployment-scanner subsystem as well, but that doesn't seem to get me anywhere useful.
This answer from a similar thread worked for us (with some minor tweaking): https://stackoverflow.com/a/41261864/3486967