Code example for MalformedObjectNameException

Methods: getMessage

0
        ObjectName objName;
 
        try { 
            objName = new ObjectName(metric.getObjectName());
        } catch (MalformedObjectNameException e) {
            throw new MetricInvalidException(e.getMessage(), e);
        } 
 
        try { 
            return mServer.getAttribute(objName,
                    metric.getAttributeName());
        } catch (MBeanException e) {
            String msg = "MBeanException: " + e.getMessage();
            throw new PluginException(msg, e);
        } catch (AttributeNotFoundException e) {
            String msg = "Attribute '" + attributeName + "' "
                    + "not found for '" + objName + "'";
            throw new MetricNotFoundException(msg, e);
        } catch (InstanceNotFoundException e) {
            String msg = "MBean '" + objName + "' not found";