Examples of AnnotationTestInstrumentation


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

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

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

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

        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

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

Examples of org.objectweb.celtix.bus.management.jmx.export.AnnotationTestInstrumentation

        bus.shutdown(true);
        assertEquals("Instrumented stuff not removed from list", 0, list.size());
    }
   
    public void testCustemerInstrumentationByEvent() throws BusException {
        AnnotationTestInstrumentation ati = new AnnotationTestInstrumentation();
        bus.sendEvent(new ComponentCreatedEvent(ati));
       
        List<Instrumentation> list = im.getAllInstrumentation();
        assertEquals("Not exactly the number of instrumented item", 3, list.size());
       
View Full Code Here

Examples of org.objectweb.celtix.bus.management.jmx.export.AnnotationTestInstrumentation

        assertEquals("Instrumented stuff not removed from list", 0, list.size());
       
    }
   
    public void testCustemerInstrumentationByInstrumentationManager() throws BusException {
        AnnotationTestInstrumentation ati = new AnnotationTestInstrumentation();
        im.register(ati);
       
        List<Instrumentation> list = im.getAllInstrumentation();
        assertEquals("Not exactly the number of instrumented item", 3, list.size());
       
View Full Code Here

Examples of org.objectweb.celtix.bus.management.jmx.export.AnnotationTestInstrumentation

        connector.setDaemon(false);
        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));
       
        try {           
            Object val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
            assertEquals("Incorrect result", "John Smith", val);
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.