Java Reference
In-Depth Information
Reading management model descriptions via the
raw management API
Using the detyped management API is not too different from its scripting language coun-
terpart; at first, you need to create a management client that can connect to your target pro-
cess's native management socket (which can be an individual standalone mode server, or in
a domain mode environment, the domain controller):
ModelControllerClient client =
Next, you need to create an operation request object using the
org.jboss.dmr.ModelNode class, as shown in the following command:
final ModelNode operation = new ModelNode();
final ModelNode address = operation.get("address");
address.add("subsystem", "naming");
final ModelNode returnVal = client.execute(operation);"result").toString());
As you can see, ModelNode objects can be chained in order to reach an operation (in the
example, the JNDI view), which is available on a node path (in our case, the naming sub-
Once you have added the ModelNode attributes, you can issue the execute commands
on your node, which will in turn return ModelNode where the result of the operation will
be stored.
In the samples, you can find a fully working project containing these management ex-
Search WWH ::

Custom Search