Examples of queryNames()


Examples of javax.management.MBeanServerConnection.queryNames()

  public Set queryNames(String query) {
    Set results = new HashSet();
    MBeanServerConnection conn = getConnection();
    if (conn == null) return results;
    try {
      results = conn.queryNames(new ObjectName(query), null);
    } catch (Exception e) {
      // ignore
    }
    return results;
  }
View Full Code Here

Examples of javax.management.MBeanServerConnection.queryNames()

      JMXServiceURL jmxServiceURL = JMXUtil.createQuartzInstanceConnection(config);
      JMXConnector connector = JMXConnectorFactory.connect(jmxServiceURL, env);
      MBeanServerConnection connection = connector.getMBeanServerConnection();

      ObjectName mBName = new ObjectName("quartz:type=QuartzScheduler,*");
      Set<ObjectName> names = connection.queryNames(mBName, null);
      QuartzInstance quartzInstance = new QuartzInstance();
      quartzInstance.setMBeanServerConnection(connection);
      quartzInstance.setJmxConnector(connector);

      List<Scheduler> schList = new ArrayList<Scheduler>();
View Full Code Here

Examples of javax.management.MBeanServerConnection.queryNames()

            rr.set("default_domain", mbsc.getDefaultDomain());
            rr.set("mbean_count", mbsc.getMBeanCount());

      ConcurrentHashMap<ObjectName, ArrayList<String>> cache = null;
      if ( ! attribute_cache.containsKey(check.get("name")) ) {
                Set<ObjectName> allObjectNames = mbsc.queryNames(null, null);

                ArrayList<String> domains = new ArrayList<String>();
                if ( mbean_domains != null ) {
                    domains = new ArrayList<String>(Arrays.asList(mbean_domains.split("\\s+")));
                }
View Full Code Here

Examples of javax.management.j2ee.Management.queryNames()

      };
      getLog().debug("+++ testWebModules");
      Management jsr77MEJB = getManagementEJB();
      String domainName = jsr77MEJB.getDefaultDomain();
      ObjectName webModules = new ObjectName(domainName+":j2eeType=WebModule,*");
      Set<ObjectName> names = jsr77MEJB.queryNames(webModules, null);
      assertTrue("", names.size() > 0);
      getLog().debug("Found web modules: "+names);
      boolean sawNullAttributes = false;
      for(ObjectName name : names)
      {
View Full Code Here

Examples of javax.management.j2ee.Management.queryNames()

      Management jsr77MEJB = getManagementEJB();
      String beanName = null;
      String query = "*:j2eeType=StatelessSessionBean,*";
      log.info(query);
      ObjectName ejbName = new ObjectName(query);
      Set managedObjects = jsr77MEJB.queryNames(ejbName,  null);
      log.info("Found " + managedObjects.size() + " objects");
      Iterator i = managedObjects.iterator();
      while (i.hasNext())
      {
         ObjectName oName = (ObjectName) i.next();
View Full Code Here

Examples of javax.management.j2ee.Management.queryNames()

   {
      try
      {
         getLog().debug("+++ testNotificationDeliver");
         Management jsr77MEJB = getManagementEJB();
         Set names = jsr77MEJB.queryNames(getMailName(jsr77MEJB), null);
         if (names.isEmpty())
         {
            fail("Could not found JSR-77 JavaMailResource'" + TEST_MAIL + "'");
         }
         ObjectName lMail = (ObjectName) names.iterator().next();
View Full Code Here

Examples of javax.management.j2ee.Management.queryNames()

         jsr77MEJB = getManagementEJB();
         String domain = jsr77MEJB.getDefaultDomain();
         ObjectName domainQuery = new ObjectName(domain
            + ":" + J2EEManagedObject.TYPE + "=" + J2EETypeConstants.J2EEDomain
            + ",name="+domain);
         Set names = jsr77MEJB.queryNames(domainQuery, null);

         if (names.isEmpty())
         {
            fail("Could not find any J2EEDomain");
         }
View Full Code Here

Examples of javax.management.j2ee.Management.queryNames()

         + ":" + J2EEManagedObject.TYPE + "=" + J2EETypeConstants.J2EEDomain
         + ",name="+domain;
      log.debug("nameStr=("+nameStr+")");
      ObjectName domainQuery = new ObjectName(nameStr);
      log.debug("domainQuery=("+domainQuery+")");
      Set names = jsr77MEJB.queryNames(domainQuery, null);
      if (names.isEmpty())
      {
         fail("Could not find JSR-77 J2EEDomain '" + J2EETypeConstants.J2EEDomain + "'");
      }
      if (names.size() > 1)
View Full Code Here

Examples of javax.management.j2ee.Management.queryNames()

      Management jsr77MEJB = getManagementEJB();
      String domainName = jsr77MEJB.getDefaultDomain();
      ObjectName queryName = new ObjectName(domainName + ":" +
         J2EEManagedObject.TYPE + "=" + J2EETypeConstants.J2EEServer + "," + "*");

      Set names = jsr77MEJB.queryNames(queryName, null);
      if (names.isEmpty())
      {
         fail("Could not find JSR-77 J2EEServer '" + J2EETypeConstants.J2EEServer + "'");
      }
      Iterator iter = names.iterator();
View Full Code Here

Examples of javax.management.j2ee.Management.queryNames()

      getLog().debug("+++ testJavaMailResource");
      Management jsr77MEJB = getManagementEJB();
      String domainName = jsr77MEJB.getDefaultDomain();
      ObjectName queryName = new ObjectName(domainName + ":" +
         J2EEManagedObject.TYPE + "=" + J2EETypeConstants.JavaMailResource + "," + "*");
      Set names = jsr77MEJB.queryNames(queryName, null);
      if (names.isEmpty())
      {
         fail("Could not find JSR-77 JavaMailResource '" + J2EETypeConstants.JavaMailResource + "'");
      }
      Iterator iter = names.iterator();
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.