Package org.apache.cxf.management.jmx.export

Examples of org.apache.cxf.management.jmx.export.AnnotationTestInstrumentation


        //manager.setDaemon(false);
        //manager.setThreaded(false);
        //manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
        //manager.init();

        AnnotationTestInstrumentation im = new AnnotationTestInstrumentation();
        ObjectName name = new ObjectName("org.apache.cxf:type=foo,name=bar");       
        im.setName("John Smith");         
        manager.register(im, name);
       
        Object val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "John Smith", val);
       
        try {
            manager.register(im, name);
            fail("Registering with existing name should fail.");
        } catch (JMException jmex) {
            //Expected
        }
       
        manager.register(im, name, true);               
       
        val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "John Smith", val);
        manager.unregister(name);
       
        im.setName("Foo Bar")
        name = manager.register(im);

        val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "Foo Bar", val);
       
View Full Code Here


        //manager.setDaemon(false);
        //manager.setThreaded(false);
        //manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
        //manager.init();

        AnnotationTestInstrumentation im = new AnnotationTestInstrumentation();
        ObjectName name = new ObjectName("org.apache.cxf:type=foo,name=bar");       
        im.setName("John Smith");         
        manager.register(im, name);
       
        Object val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "John Smith", val);
       
        try {
            manager.register(im, name);
            fail("Registering with existing name should fail.");
        } catch (JMException jmex) {
            //Expected
        }
       
        manager.register(im, name, true);               
       
        val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "John Smith", val);
        manager.unregister(name);
       
        im.setName("Foo Bar")
        name = manager.register(im);

        val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "Foo Bar", val);
       
View Full Code Here

        //manager.setDaemon(false);
        //manager.setThreaded(false);
        //manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
        //manager.init();

        AnnotationTestInstrumentation im = new AnnotationTestInstrumentation();
        ObjectName name = new ObjectName("org.apache.cxf:type=foo,name=bar");       
        im.setName("John Smith");         
        manager.register(im, name);
       
        Object val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "John Smith", val);
       
        try {
            manager.register(im, name);
            fail("Registering with existing name should fail.");
        } catch (JMException jmex) {
            //Expected
        }
       
        manager.register(im, name, true);               
       
        val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "John Smith", val);
        manager.unregister(name);
       
        im.setName("Foo Bar")
        name = manager.register(im);

        val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "Foo Bar", val);
       
View Full Code Here

        connector.setDaemon(false);
        connector.setThreaded(false);
        connector.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
        manager.init(connector);
        // setup the fack instrumentation
        AnnotationTestInstrumentation im = new AnnotationTestInstrumentation();
        ObjectName name = JMXUtils.getObjectName(im.getUniqueInstrumentationName(),
                                                 im.getInstrumentationName());
      
        im.setName("John Smith");         
        manager.registerMBean(im);
       
        try {           
            Object val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
            assertEquals("Incorrect result", "John Smith", val);
View Full Code Here

        //manager.setDaemon(false);
        //manager.setThreaded(false);
        //manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
        //manager.init();

        AnnotationTestInstrumentation im = new AnnotationTestInstrumentation();
        ObjectName name = new ObjectName("org.apache.cxf:type=foo,name=bar");       
        im.setName("John Smith");         
        manager.register(im, name);
       
        Object val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "John Smith", val);
       
        try {
            manager.register(im, name);
            fail("Registering with existing name should fail.");
        } catch (JMException jmex) {
            //Expected
        }
       
        manager.register(im, name, true);               
       
        val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "John Smith", val);
        manager.unregister(name);
       
        im.setName("Foo Bar")
        name = manager.register(im);

        val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
        assertEquals("Incorrect result", "Foo Bar", val);
       
View Full Code Here

TOP

Related Classes of org.apache.cxf.management.jmx.export.AnnotationTestInstrumentation

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.