-
Notifications
You must be signed in to change notification settings - Fork 29
Jmx Management
You can make your configuration object manageable at runtime via JMX by adding the @Manageable
annotation:
@Manageable(name = "myConfig")
public class ManageableConfig implements ManageableConfigMBean {
@SystemProperty(value = "size")
private int size;
// getters and setters
}
The object must be JMX compliant (either by adding the @MXBean
annotation or by implementing a management interface). Please refer to JMX documentation for more details on JMX compliant objects.
In the previous example, we made the ManageableConfig
class JMX compliant by implementing the management interface ManageableConfigMBean
:
public interface ManageableConfigMBean {
int getSize();
void setSize(int size);
}
This will allow the size
property to be changed at runtime with any JMX client. The configuration object will be exposed through JMX under the name specified in the name
attribute of the @Manageable
annotation. In the previous example, it will be myConfig
.
Easy Properties is created by Mahmoud Ben Hassine and the awesome contributors
-
Introduction
-
Documentation