Examples of unregisterMBean()


Examples of javax.management.MBeanServer.unregisterMBean()

    public void unregisterMBean()
    {
        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
        try
        {
            mbs.unregisterMBean(new ObjectName(mbeanName));
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
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()

         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()

    }

    @Override
    public void stop(ModuleContext context) throws Exception {
        MBeanServer server = ServiceLocator.getRequiredService(context, MBeanServer.class);
        server.unregisterMBean(getObjectName(context.getModule()));
    }

    private ObjectName getObjectName(Module module) throws MalformedObjectNameException {
        ResourceIdentity identity = module.getIdentity();
        return new ObjectName("test:name=" + identity.getSymbolicName() + ",version=" + identity.getVersion());
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

    }

    @Override
    public void stop(ModuleContext context) throws Exception {
        MBeanServer server = ServiceLocator.getRequiredService(context, MBeanServer.class);
        server.unregisterMBean(getObjectName(context.getModule()));
    }

    private ObjectName getObjectName(Module module) throws MalformedObjectNameException {
        ResourceIdentity identity = module.getIdentity();
        return new ObjectName("test:name=" + identity.getSymbolicName() + ",version=" + identity.getVersion());
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

        // release any MBeans we registered
        if ( registeredMBeans != null ) {
          for ( ObjectName objectName : registeredMBeans ) {
            try {
              LOG.tracev( "Unregistering registered MBean [ON={0}]", objectName );
              mBeanServer.unregisterMBean( objectName );
            }
            catch ( Exception e ) {
              LOG.debugf( "Unable to unregsiter registered MBean [ON=%s] : %s", objectName, e.toString() );
            }
          }
View Full Code Here

Examples of javax.management.MBeanServer.unregisterMBean()

        if(objectName == null){
            ROOT_LOGGER.cannotUnregisterObject();
        }
        final MBeanServer mBeanServer = getMBeanServer();
        try {
            mBeanServer.unregisterMBean(objectName);
        } catch (Exception e) {
            ROOT_LOGGER.unregistrationFailure(e, objectName);
        }
    }
View Full Code Here

Examples of javax.management.MBeanServerConnection.unregisterMBean()

      Iterator iter = names.iterator();
      while (iter.hasNext())
      {
         ObjectName name = (ObjectName)iter.next();
         server.unregisterMBean(name);
      }
      closeServer();
   }
}
View Full Code Here

Examples of org.apache.derby.iapi.services.jmx.ManagementService.unregisterMBean()

            consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
        }
         
          // And now unregister any MBeans.
        try {
            mgmtService.unregisterMBean(versionMBean);
            mgmtService.unregisterMBean(networkServerMBean);
        } catch (Exception exception) {
            consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
        }
View Full Code Here

Examples of org.apache.derby.iapi.services.jmx.ManagementService.unregisterMBean()

        }
         
          // And now unregister any MBeans.
        try {
            mgmtService.unregisterMBean(versionMBean);
            mgmtService.unregisterMBean(networkServerMBean);
        } catch (Exception exception) {
            consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
        }

      if (shutdownDatabasesOnShutdown) {
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.