-
Notifications
You must be signed in to change notification settings - Fork 28
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
}
Easy Props will automatically register an MBean
for your configuration object. In the previous example, the object will be exposed via JMX under the name org.jeasy.props:name=myConfig
.
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.
Easy Properties is created by Mahmoud Ben Hassine and the awesome contributors
-
Introduction
-
Documentation