MBeans provide two entities to the outside world:
* Attributes
* Operations
The former is a simple key/value lookup, while the latter
triggers a method call and yields the result.
Operations have signatures, they can be fed an array of
parameters. For now, calls are triggered assuming
there are no parameters. Later a separate keyword
`Operation` can be introduced, taking a list of
`Parameter` directives specifying type and values
to feed to the MBean operation.
try
{
- value = conn.getAttribute (objName, key);
+ try
+ {
+ value = conn.getAttribute (objName, key);
+ }
+ catch (javax.management.AttributeNotFoundException e)
+ {
+ value = conn.invoke (objName, key, null, null);
+ }
}
catch (Exception e)
{