Examples of unregisterMBean()


Examples of javax.management.MBeanServer.unregisterMBean()

    mBeans.clear();

    // to prevent naming conflicts: let's unreg also possible leftovers (with the same prefix)
    for (ObjectName objectName : mbs.queryNames(new ObjectName(getPackageName(jmxPrefix) + ":name=com.p6spy.*"), null)) {
      try {
        mbs.unregisterMBean(objectName);
      } catch (InstanceNotFoundException e) {
        // this just means someone unregistered the bean earlier than us
        // (quite unprobable, but parallel unreg could happen)
        // but we're OK with that and it can't cause failure
      }
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

    private void unregisterJmx() {
        try {
            if (jmxName != null) {
                MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
                mbs.unregisterMBean(jmxName);
            }
        } catch (InstanceNotFoundException ignore) {
            // NOOP
        } catch (Exception e) {
            log.error("Unable to unregister JDBC pool with JMX", e);
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

    HttpConnectorActivator.log(LogService.LOG_INFO, "Stopping JMX Http connector "+version,null);
    this.http.stop();
    ServiceReference sr = bc.getServiceReference(javax.management.MBeanServer.class.getName());
    if (sr!=null){
      MBeanServer server= (MBeanServer)bc.getService(sr);
      server.unregisterMBean(processorName);
      server.unregisterMBean(httpName);
    }
    HttpConnectorActivator.log(LogService.LOG_INFO, "JMX Http Connector stopped "+version,null);
    HttpConnectorActivator.bc=null;
  }
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

    this.http.stop();
    ServiceReference sr = bc.getServiceReference(javax.management.MBeanServer.class.getName());
    if (sr!=null){
      MBeanServer server= (MBeanServer)bc.getService(sr);
      server.unregisterMBean(processorName);
      server.unregisterMBean(httpName);
    }
    HttpConnectorActivator.log(LogService.LOG_INFO, "JMX Http Connector stopped "+version,null);
    HttpConnectorActivator.bc=null;
  }
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

         log.warn("Cannot undeploy a destination that has not been created programatically");
         return false;
      }
      mbeanServer.invoke(on, "stop", new Object[0], new String[0]);
      mbeanServer.invoke(on, "destroy", new Object[0], new String[0]);
      mbeanServer.unregisterMBean(on);
      return true;
   }

   /*
    * Undeploy the MBean and delete the underlying data
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

        connectorServer.stop();

        MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();

        ObjectName mbeanName = new ObjectName(JMX_MBEAN_NAME);
        mBeanServer.unregisterMBean(mbeanName);
    }

    @Test
    public void testNormal() throws Exception {
        JmxActionDefinition definition = new JmxActionDefinition();
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

                    try {
                        ObjectName handlerOname = new ObjectName(
                                this.domain + ":" + "type=JkHandler,name=" +
                                handlerName);
                        if (s.isRegistered(handlerOname)) {
                            s.unregisterMBean(handlerOname);
                        }
                    } catch (Exception e) {
                        log.error( "Error unregistering " + handlerName, e );
                    }
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

        if (domain != null) {
            try {
                ObjectName wEnvName =
                    new ObjectName(domain + ":type=JkWorkerEnv");
                if (s.isRegistered(wEnvName)) {
                    s.unregisterMBean(wEnvName);
                }
            } catch (Exception e) {
                log.error( "Error unregistering JkWorkerEnv", e );
            }
        }
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

        MBeanServer server = LocalMBeanServer.get();
        for (Object objectName : appInfo.jmx.values()) {
            try {
              ObjectName on = new ObjectName((String) objectName);
              if (server.isRegistered(on)) {
                      server.unregisterMBean(on);
              }
            } catch (InstanceNotFoundException e) {
                logger.warning("can't unregister " + objectName + " because the mbean was not found", e);
            } catch (MBeanRegistrationException e) {
                logger.warning("can't unregister " + objectName, e);
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

            final MBeanServer server = LocalMBeanServer.get();
            final ObjectName objectName = getObjectName();

            if (server.isRegistered(objectName)) {
                server.unregisterMBean(objectName);
            }

        } catch (Throwable e) {
            logger.warning("Failed to de-register the 'openejb' mbean", e);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.