summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da193ed)
raw | patch | inline | side by side (parent: da193ed)
author | Pierre-Yves Ritschard <pyr@spootnik.org> | |
Wed, 18 Jan 2012 12:57:11 +0000 (13:57 +0100) | ||
committer | Pierre-Yves Ritschard <pyr@spootnik.org> | |
Wed, 18 Jan 2012 12:57:11 +0000 (13:57 +0100) |
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.
* 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.
bindings/java/org/collectd/java/GenericJMXConfValue.java | patch | blob | history |
diff --git a/bindings/java/org/collectd/java/GenericJMXConfValue.java b/bindings/java/org/collectd/java/GenericJMXConfValue.java
index 0eb0d5f89aad81466daf63ee26e95cb81e43949c..0ed1990867f3d161ebbed04eafb12f31d230caa7 100644 (file)
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)
{