From: <gla...@hy...> - 2009-12-30 20:29:16
|
Author: glaullon Date: 2009-12-30 12:29:00 -0800 (Wed, 30 Dec 2009) New Revision: 14123 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14123 Modified: trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/ApplicationCollector.java Log: HHQ-3618 Modified: trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/ApplicationCollector.java =================================================================== --- trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/ApplicationCollector.java 2009-12-30 09:20:41 UTC (rev 14122) +++ trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/ApplicationCollector.java 2009-12-30 20:29:00 UTC (rev 14123) @@ -28,9 +28,13 @@ import org.hyperic.hq.product.PluginException; import com.ibm.websphere.management.AdminClient; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; public class ApplicationCollector extends WebsphereCollector { + private static final Log log = LogFactory.getLog(ApplicationCollector.class.getName()); + protected void init(AdminClient mServer) throws PluginException { super.init(mServer); @@ -60,11 +64,13 @@ Object state = getAttribute(getMBeanServer(), this.name, "state"); - if (state == null) { + log.debug("[collect] name='"+name.getKeyProperty("name")+"' state='"+state+"("+state.getClass()+")'"); + + if ((state == null) || (!(state instanceof Integer))) { setAvailability(false); } else { - setAvailability(true); + setAvailability(((Integer)state).intValue()==1); } } } |