Package javax.management

Examples of javax.management.MBeanServerConnection.queryMBeans()


        try {
            JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
            mbsc = jmxc.getMBeanServerConnection();

            // trace all existing MBeans
            Set<?> all = mbsc.queryMBeans(null, null);
            LOG.info("Total MBean count=" + all.size());
            for (Object o : all) {
                ObjectInstance bean = (ObjectInstance)o;
                LOG.info(bean.getObjectName());
            }
View Full Code Here


                Thread.sleep(100);
            }
            MBeanServerConnection mbsc = getMBeanServerConnection();
            if (mbsc != null) {
                LOG.info("Query name: " + beanName);
                mbeans = mbsc.queryMBeans(beanName, null);
                if (mbeans != null) {
                    count = mbeans.size();
                }
            }
        } while ((mbeans == null || mbeans.isEmpty()) && expiryTime > System.currentTimeMillis());
View Full Code Here

        try {
            JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
            mbsc = jmxc.getMBeanServerConnection();

            // trace all existing MBeans
            Set<?> all = mbsc.queryMBeans(null, null);
            LOG.info("Total MBean count=" + all.size());
            for (Object o : all) {
                ObjectInstance bean = (ObjectInstance)o;
                LOG.info(bean.getObjectName());
            }
View Full Code Here

  private String getSharedLibPath() throws Exception {
    // locate the path of the first sharedlib library folder
    GeronimoServerBehaviourDelegate gsDelegate = (GeronimoServerBehaviourDelegate) server.getAdapter(GeronimoServerBehaviourDelegate.class);
    MBeanServerConnection connection = gsDelegate.getServerConnection();
    Set result = connection.queryMBeans(new ObjectName("*:j2eeType=GBean,name=SharedLib,*"), null);
    if (!result.isEmpty()) {
      ObjectInstance instance = (ObjectInstance) result.toArray()[0];
      String[] libDirs = (String[]) connection.getAttribute(instance.getObjectName(),"libDirs");
      if (libDirs != null && libDirs.length > 0) {
        return libDirs[0];
View Full Code Here

    {
        List<ManagedBean> mbeans = new ArrayList<ManagedBean>();
        JMXServerRegistry serverRegistry = (JMXServerRegistry)ApplicationRegistry.getServerRegistry(server);
        MBeanServerConnection mbsc = serverRegistry.getServerConnection();
        ObjectName objName = new ObjectName(domain + ":*");
        Set objectInstances = mbsc.queryMBeans(objName, null);

        for (Iterator itr = objectInstances.iterator(); itr.hasNext();)
        {
            ObjectInstance instance = (ObjectInstance)itr.next();
            ManagedBean obj = new JMXManagedObject(instance.getObjectName());
View Full Code Here

        MBeanServerConnection mbeanServer = connector.getMBeanServerConnection();

        // look for all beans in the d2 name space
        Set<ObjectInstance> objectInstances =
            mbeanServer.queryMBeans(new ObjectName("com.linkedin.d2:*"), null);

        for (ObjectInstance objectInstance : objectInstances)
        {
          System.err.println("checking object: " + objectInstance.getObjectName());

View Full Code Here

        QueryExp queryExp = createQueryExp(queryExpStr);

        // Convert mbeans set to list to make it standard throughout the query
        // filter
        List mbeans = new ArrayList(server.queryMBeans(objName, queryExp));

        jmxConn.close();

        return mbeans;
    }
View Full Code Here

         throw new IllegalArgumentException("Unable to retrieve catalina MBeans for protocol metadata construction.\n"
               + "Object name must not be null", e);
      }

      // this might return empty set
      return mbsc.queryMBeans(servletON, null);
   }

   /**
    * catch (Exception ex)
    * {
 
View Full Code Here

          MBeanServerConnection mbeanConn = jmxConnector.getMBeanServerConnection();

          //String cassandraNodes = (String)mbeanConn.getAttribute(cqsAPIMonitor, "CassandraNodes");
         
          Set<ObjectInstance> objectInstances = mbeanConn.queryMBeans(new ObjectName("me.prettyprint.cassandra.*:*"), null);

          if (objectInstances.size() == 1) {
         
            //ObjectName hectorMonitor = new ObjectName("me.prettyprint.cassandra.service_cmb:ServiceType=CMB,MonitorType=hector");
            ObjectName hectorMonitor = ((ObjectInstance)objectInstances.toArray()[0]).getObjectName();
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.