How to read Jmx Database Property

In a service I would like to check the value of a property I created
calling from Administrator-> JmxConsole-> setDbProperty
ā€¦ can someone show me an example of code for reading the property
with getDbProperty ?

Tanks, Massimo.


Take a look at Configuration interfaces.

You can use them with SourceType.DATABASE:

@Source(type = SourceType.DATABASE)
public interface SalesConfig extends Config {

    String getCompanyName();

    String getFtpPassword();

And then read property as follows:

private SalesConfig salesConfig;

public void doSomething() {
    String name = salesConfig.getCompanyName();

Great, it worked perfectly
thank you!