public void remove(String name, String group) throws ManagementException { try { group = parseGroup(group); ObjectName objectName = new ObjectName(DOMAIN + ":SubDomain=runtime, type=resource, group=" + group + ", name=" + name); mBeanServer.unregisterMBean(objectName); } catch (MalformedObjectNameException e) { throw new ManagementException(e); } catch (InstanceNotFoundException e) { throw new ManagementException(e); } catch (MBeanRegistrationException e) { throw new ManagementException(e); } }
public void remove(URI componentUri, ManagementInfo info) throws ManagementException { try { ObjectName name = getObjectName(componentUri, info); mBeanServer.unregisterMBean(name); } catch (JMException e) { throw new ManagementException(e); } }
public void export(URI componentUri, ManagementInfo info, ObjectFactory<?> objectFactory, ClassLoader classLoader) throws ManagementException { if (mBeanServer == null) { return; } try { ObjectName name = getObjectName(componentUri, info); OptimizedMBean<?> mBean = createOptimizedMBean(info, objectFactory, classLoader); if (!mBeanServer.isRegistered(name)) { mBeanServer.registerMBean(mBean, name); } } catch (JMException e) { throw new ManagementException(e); } catch (ClassNotFoundException e) { throw new ManagementException(e); } catch (NoSuchMethodException e) { throw new ManagementException(e); } }
throw new ManagementException(e); } catch (JMException e) { throw new ManagementException(e); } catch (ClassNotFoundException e) { throw new ManagementException(e); } catch (NoSuchMethodException e) { throw new ManagementException(e);