Package javax.management

Examples of javax.management.Attribute


         {
            String attribute = attributes[i];
            try
            {
               Object result = getAttribute(attribute);
               list.add(new Attribute(attribute, result));
            }
            catch (AttributeNotFoundException ignored)
            {
            }
            catch (MBeanException ignored)
View Full Code Here


      int val = JOptionPane.showOptionDialog(jp, "Select a log level for \"..."+connString+"\" :", "Log level", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, LOG_LVL, LOG_LVL[curentVal.intValue()-1]);
      if ( val == JOptionPane.CLOSED_OPTION ) { return; }
      Integer newVal = new Integer(val+1);

      mb.setAttribute(Activator.REMOTE_LOGGER_ON, new Attribute("LogLvl", newVal));
      DefaultMutableTreeNode ddmmttnn=(DefaultMutableTreeNode) tp.getLastPathComponent();
      ht_logLvl.put(ddmmttnn, newVal);
    } catch (Exception ex) {
      JOptionPane.showMessageDialog(jp,"Error with \"..."+connString+"\" :\n"+ex, "Error :", JOptionPane.ERROR_MESSAGE);
      ex.printStackTrace();
View Full Code Here

           InvalidAttributeValueException,
           MBeanException,
           ReflectionException,
           IOException
   {
      Attribute attrib = (Attribute)RMIMarshaller.unmarshal(attribute, server.getClassLoaderFor(name), defaultLoader);
      server.setAttribute(name, attrib);
   }
View Full Code Here

        }
        if (value != null)
        {
          try
          {
            server.setAttribute(name, new Attribute(attributeVariable, value));
            attributeElement.setAttribute("result", "success");
            attributeElement.setAttribute("value", valueVariable);
          }
          catch (Exception e)
          {
View Full Code Here

          }
          if (value != null)
          {
            try
            {
              server.setAttribute(name, new Attribute(attributeVariable, value));
              operationElement.setAttribute("result", "success");
            }
            catch (Exception e)
            {
              operationElement.setAttribute("result", "error");
View Full Code Here

                new String[] { "MBeanServerId", "SpecificationName",
                    "SpecificationVersion", "SpecificationVendor",
                    "ImplementationName", "ImplementationVersion",
                    "ImplementationVendor" });
            for (Object object : attrs) {
                Attribute attr = (Attribute) object;
                if (attr.getValue() != null) {
                    mbeanProps.put(attr.getName(), attr.getValue().toString());
                }
            }
        } catch (Exception je) {
            logger.log(
                Logger.LOG_INFO,
View Full Code Here

                            host + path);
                }
                if( mserver.isRegistered(parent ))  {
                    if(log.isDebugEnabled())
                        log.debug("Register with " + parent);
                    mserver.setAttribute(parent, new Attribute("realm", this));
                }
            } catch (Exception e) {
                log.error("Parent not available yet: " + parent)
            }
        }
View Full Code Here

   public void testQueryStatsMBean() throws Exception {
      ObjectName name = getQueryStatsObjectName(JMX_DOMAIN, TEST_CACHE_NAME);
      assertTrue(server.isRegistered(name));
      assertFalse((Boolean) server.getAttribute(name, "StatisticsEnabled"));
      server.setAttribute(name, new Attribute("StatisticsEnabled", true));
      assertTrue((Boolean) server.getAttribute(name, "StatisticsEnabled"));
   }
View Full Code Here

   public void testEmbeddedAttributeQuery() throws Exception {
      ObjectName name = getQueryStatsObjectName(JMX_DOMAIN, TEST_CACHE_NAME);

      log.tracef("StatisticsEnabled=%s", server.getAttribute(name, "StatisticsEnabled"));

      server.setAttribute(name, new Attribute("StatisticsEnabled", true));

      remoteCache.put(1, createUser(1));
      remoteCache.put(2, createUser(2));

      // get user back from remote cache via query and check its attributes
View Full Code Here

      }

      sc.install(on, loaderObjectName, element);

      // inject dependencies
      mbeanServer.setAttribute(on, new Attribute("ServerPeer", getServiceName()));
      mbeanServer.setAttribute(on, new Attribute("JNDIName", jndiName));
      if (params)
      {
         mbeanServer.setAttribute(on, new Attribute("FullSize", new Integer(fullSize)));
         mbeanServer.setAttribute(on, new Attribute("PageSize", new Integer(pageSize)));
         mbeanServer.setAttribute(on, new Attribute("DownCacheSize", new Integer(downCacheSize)));
      }
      mbeanServer.invoke(on, "create", new Object[0], new String[0]);
      mbeanServer.invoke(on, "start", new Object[0], new String[0]);

      return (String)JMXAccessor.getJMXAttributeOverSecurity(mbeanServer, on, "JNDIName");
View Full Code Here

TOP

Related Classes of javax.management.Attribute

Copyright © 2018 www.massapicom. 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.