Example usage for javax.management MalformedObjectNameException getLocalizedMessage

List of usage examples for javax.management MalformedObjectNameException getLocalizedMessage

Introduction

In this page you can find the example usage for javax.management MalformedObjectNameException getLocalizedMessage.

Prototype

public String getLocalizedMessage() 

Source Link

Document

Creates a localized description of this throwable.

Usage

From source file:org.rhq.plugins.jbossas.JBossASServerComponent.java

private static String getCanonicalName(String objectName) {
    ObjectName on;/*from  w w  w .  j a  v a2s  .co m*/
    try {
        on = new ObjectName(objectName);
    } catch (MalformedObjectNameException e) {
        throw new IllegalStateException(
                "Malformed JMX object name: " + objectName + " - " + e.getLocalizedMessage());
    }
    return on.getCanonicalName();
}