Package javax.management

Examples of javax.management.ObjectName$Property


          "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi");
      JMXConnector jmxc = JMXConnectorFactory.connect(url, null);

      MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();

      ObjectName adaptor = new ObjectName("xBus:mbean=Administrator");

      AdministratorMBean mbeanProxy = JMX.newMBeanProxy(mbsc, adaptor,
          AdministratorMBean.class, true);

      return mbeanProxy;
View Full Code Here


        connector.setThreaded(false);
        connector.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
        manager.init(policy);
        // setup the fack instrumentation
        AnnotationTestInstrumentation im = new AnnotationTestInstrumentation();
        ObjectName name = JMXUtils.getObjectName(im.getInstrumentationName(),
                                                 im.getUniqueInstrumentationName(),
                                                 BUS_ID);
      
        im.setName("John Smith");         
        manager.processEvent(new InstrumentationCreatedEvent(im));
View Full Code Here

import junit.framework.TestCase;

public class JMXUtilsTest extends TestCase {
    static final String OBJECT_NAME = "org.objectweb.celtix.instrumentation:type=foo,Bus=celtix,name=boo";
    public void testGetObjectName() {
        ObjectName name = JMXUtils.getObjectName("foo", ",name=boo", "celtix");       
        assertTrue("The wrong object name", OBJECT_NAME.compareTo(name.toString()) == 0);
    }
View Full Code Here

    }

    protected void onSetUp() throws Exception {
       
        try {
            ton = new ObjectName("org.objectweb.celtix:Type=testInstrumentation");
        } catch (MalformedObjectNameException e) {           
            e.printStackTrace();
        } catch (NullPointerException e) {           
            e.printStackTrace();
        }
View Full Code Here

      MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
      // Unique identification of MBeans
      Statistics statBean = Statistics.getStatistics();
      // Uniquely identify the MBeans and register them with the platform
      // MBeanServer
      ObjectName statName = new ObjectName("marauroad:name=Statistics");
      mbs.registerMBean(statBean, statName);
      logger.debug("Statistics bean registered.");
    } catch (Exception e) {
      logger.error("cannot register statistics bean, continuing anyway.", e);
    }
View Full Code Here

     * @param object
     *            {@link Object}
     * @return {@link ObjectName} instance
     */
    public ObjectName createObjectName(Object object) {
        ObjectName objectName = null;
        try {
            objectName = new ObjectName(object.getClass().toString() + ":type=Manager,name="
                    + object.getClass().getName());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return objectName;
View Full Code Here

     
      //Need to pause a little while - cancelling back to the queue is async
     
      Thread.sleep(500);

      ObjectName on = new ObjectName("jboss.messaging.destination:service=Queue,name=Queue");
      Integer i = (Integer)ServerManagement.getAttribute(on, "MessageCount");

      assertEquals(1, i.intValue());
   }
View Full Code Here

      cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");

      queue = (Queue)ic.lookup("/queue/HTTPTestQueue");

      queueObjectName =
         new ObjectName("jboss.messaging.destination:service=Queue,name=HTTPTestQueue");

      ServerManagement.invoke(queueObjectName, "removeAllMessages", new Object[0], new String[0]);

      log.debug("setup done");
   }
View Full Code Here

         "       <attribute name=\"Clustered\">" + String.valueOf(clustered) + "</attribute>" +
         "</mbean>";

      MBeanConfigurationElement mbean =
         new MBeanConfigurationElement(XMLUtil.stringToElement(config));
      ObjectName deston = sc.registerAndConfigureService(mbean);
      sc.invoke(deston, "create", new Object[0], new String[0]);
      sc.invoke(deston, "start", new Object[0], new String[0]);
   }
View Full Code Here

         "    <attribute name=\"Clustered\">" + String.valueOf(clustered) + "</attribute>" +
         "</mbean>";

      MBeanConfigurationElement mbean =
         new MBeanConfigurationElement(XMLUtil.stringToElement(config));
      ObjectName deston = sc.registerAndConfigureService(mbean);
      sc.invoke(deston, "create", new Object[0], new String[0]);
      sc.invoke(deston, "start", new Object[0], new String[0]);
   }
View Full Code Here

TOP

Related Classes of javax.management.ObjectName$Property

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.