pd.setPlugin ("GenericJMX");
for (int i = 0; i < this._mbeans.size (); i++)
- this._mbeans.get (i).query (this._jmx_connection, pd);
+ {
+ int status;
+
+ status = this._mbeans.get (i).query (this._jmx_connection, pd);
+ if (status != 0)
+ {
+ this._jmx_connection = null;
+ return;
+ }
+ } /* for */
} /* }}} void query */
public String toString ()
return (this._name);
} /* }}} */
- public void query (MBeanServerConnection conn, PluginData pd) /* {{{ */
+ public int query (MBeanServerConnection conn, PluginData pd) /* {{{ */
{
Set<ObjectName> names;
Iterator<ObjectName> iter;
catch (Exception e)
{
Collectd.logError ("GenericJMXConfMBean: queryNames failed: " + e);
- return;
+ return (-1);
}
if (names.size () == 0)
for (int i = 0; i < this._values.size (); i++)
this._values.get (i).query (conn, objName, pd_tmp);
}
+
+ return (0);
} /* }}} void query */
}