Example usage for javax.management MBeanException printStackTrace

List of usage examples for javax.management MBeanException printStackTrace

Introduction

In this page you can find the example usage for javax.management MBeanException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:org.mc4j.ems.impl.jmx.connection.DConnection.java

public EmsBean registerBean(String className, String objectName) {

    try {/*  ww w  .j av  a2  s . c o  m*/
        ObjectName objName = new ObjectName(objectName);
        ObjectInstance instance = connectionProvider.getMBeanServer().createMBean(className, objName);
        return mapBean(instance.getObjectName(), false);
    } catch (MBeanException e) {
        e.printStackTrace();
        throw new EmsException("Couldn't create MBean", e);
    } catch (OperationsException e) {
        throw new EmsException("Couldn't create MBean", e);
    } catch (ReflectionException e) {
        throw new EmsException("Couldn't create MBean", e);
    }
}

From source file:org.mc4j.ems.impl.jmx.connection.DConnection.java

public EmsBean registerBean(String className, String objectName, Object[] params, String[] signature) {

    try {/*w ww .  java  2s. com*/
        ObjectName objName = new ObjectName(objectName);
        ObjectInstance instance = connectionProvider.getMBeanServer().createMBean(className, objName, params,
                signature);
        return mapBean(instance.getObjectName(), false);
    } catch (MBeanException e) {
        e.printStackTrace();
        throw new EmsException("Couldn't create MBean", e);
    } catch (OperationsException e) {
        throw new EmsException("Couldn't create MBean", e);
    } catch (ReflectionException e) {
        throw new EmsException("Couldn't create MBean", e);
    }
}