Examples of queryBeans()


Examples of org.mc4j.ems.connection.EmsConnection.queryBeans()

      Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();

      EmsConnection conn = discoveryContext.getParentResourceComponent().getConnection();
      ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(CACHE_QUERY);
      List<EmsBean> beans = conn.queryBeans(queryUtility.getTranslatedQuery());

      for (EmsBean bean : beans) {

         /**
          * A discovered resource must have a unique key, that must
View Full Code Here

Examples of org.mc4j.ems.connection.EmsConnection.queryBeans()

   private EmsBean queryBean(String componentName) {
      EmsConnection conn = getConnection();
      String pattern = getSingleComponentPattern(cacheManagerName, cacheName, componentName);
      if (log.isTraceEnabled()) log.trace("Pattern to query is {0}", pattern);
      ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(pattern);
      List<EmsBean> beans = conn.queryBeans(queryUtility.getTranslatedQuery());
      if (beans.size() > 1) {
         // If more than one are returned, most likely is due to duplicate domains which is not the general case
         log.warn("More than one bean returned from applying {0} pattern: {1}", pattern, beans);
      }
      EmsBean bean = beans.get(0);
View Full Code Here

Examples of org.mc4j.ems.connection.EmsConnection.queryBeans()

      if (conn != null) {
         if (trace) log.trace("Connection to ems server established: {0}", conn);

         // Run query for manager_object
         ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(objectName);
         List<EmsBean> beans = conn.queryBeans(queryUtility.getTranslatedQuery());
         if (trace) log.trace("Querying [{0}] returned beans: {1}", queryUtility.getTranslatedQuery(), beans);

         Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
         for (EmsBean bean : beans) {
            String managerName = bean.getBeanName().getCanonicalName();
View Full Code Here

Examples of org.mc4j.ems.connection.EmsConnection.queryBeans()

      String pattern = getAllCachesPattern(ctx.getParentResourceContext().getResourceKey());
      if (trace) log.trace("Pattern to query is {0}", pattern);

      ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(pattern);
      List<EmsBean> beans = conn.queryBeans(queryUtility.getTranslatedQuery());
      if (trace) log.trace("Querying [" + queryUtility.getTranslatedQuery() + "] returned beans: " + beans);

      for (EmsBean bean : beans) {
         /* A discovered resource must have a unique key, that must
          * stay the same when the resource is discovered the next
View Full Code Here

Examples of org.mc4j.ems.connection.EmsConnection.queryBeans()

      if (conn != null) {
         if (trace) log.trace("Connection to ems server stablished: {0}", conn);

         // Run query for manager_object
         ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(objectName);
         List<EmsBean> beans = conn.queryBeans(queryUtility.getTranslatedQuery());
         if (trace) log.trace("Querying [{0}] returned beans: {1}", queryUtility.getTranslatedQuery(), beans);

         EmsBean bean = beans.get(0);
         String managerName = bean.getBeanName().getCanonicalName();
         String resourceName = bean.getAttribute("Name").getValue().toString();
View Full Code Here

Examples of org.mc4j.ems.connection.EmsConnection.queryBeans()

      EmsConnection conn = discoveryContext.getParentResourceComponent().getConnection();
      if (trace) log.trace("Connection to ems server stablished: " + conn);
     
      ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(CACHE_QUERY);
      List<EmsBean> beans = conn.queryBeans(queryUtility.getTranslatedQuery());
      if (trace) log.trace("Querying [" + queryUtility.getTranslatedQuery() + "] returned beans: " + beans);

      for (EmsBean bean : beans) {
         /* A discovered resource must have a unique key, that must
          * stay the same when the resource is discovered the next
View Full Code Here

Examples of org.mc4j.ems.connection.EmsConnection.queryBeans()

      if (conn != null) {
         if (trace) log.trace("Connection to ems server established: " + conn);

         // Run query for manager_object
         ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(objectName);
         List<EmsBean> beans = conn.queryBeans(queryUtility.getTranslatedQuery());
         if (trace) log.trace("Querying ["+queryUtility.getTranslatedQuery()+"] returned beans: " + beans);

         Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
         for (EmsBean bean : beans) {
            // Filter out spurious beans
View Full Code Here

Examples of org.mc4j.ems.connection.EmsConnection.queryBeans()

      String pattern = getAllCachesPattern(ctx.getParentResourceContext().getResourceKey());
      if (trace) log.trace("Pattern to query is " + pattern);

      ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(pattern);
      List<EmsBean> beans = conn.queryBeans(queryUtility.getTranslatedQuery());
      if (trace) log.trace("Querying "+queryUtility.getTranslatedQuery()+" returned beans: " + beans);

      for (EmsBean bean : beans) {
         // Filter out spurious beans
         if (CacheComponent.isCacheComponent(bean, "Cache")) {
View Full Code Here

Examples of org.mc4j.ems.connection.EmsConnection.queryBeans()

   private EmsBean queryBean(String componentName) {
      EmsConnection conn = getConnection();
      String pattern = getSingleComponentPattern(cacheManagerName, cacheName, componentName);
      if (log.isTraceEnabled()) log.trace("Pattern to query is " + pattern);
      ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(pattern);
      List<EmsBean> beans = conn.queryBeans(queryUtility.getTranslatedQuery());
      for (EmsBean bean : beans) {
         if (isCacheComponent(bean, componentName)) {
            return bean;
         } else {
            log.warn(String.format("MBeanServer returned spurious object %s", bean.getBeanName().getCanonicalName()));
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.