Enabling JMX
About this task
Set the EnableJMX Property
About this task
To enable JMX using the EnableJMX realm configuration property
Procedure
- In the Enterprise Manager, go to Realms > realmName > Config > JVM Management.
- Set EnableJMX to true.
Use the Admin API
About this task
Use code such as the following:
nRealmNode node = new nRealmNode(new nSessionAttributes("<UM adapter>"));
nConfigGroup config = node.getConfigGroup("JVM Management");
Enumeration changedItems = config.getItems();
while (changedItems.hasMoreElements()) {
nConfigEntry entry = (nConfigEntry) changedItems.nextElement();
if (entry.getName().equals("EnableJMX")) {
entry.setValue("true");
}
}
node.commitConfig(config);
if(node != null){
node.close();
}