Package javax.management

Examples of javax.management.MBeanServer.queryNames()


        boolean removed = context.removeRoute("bar");
        assertTrue(removed);

        // the producer cache should have been removed
        on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,name=ProducerCache*");
        names = mbeanServer.queryNames(on, null);
        assertEquals(1, names.size());

        log.info("Shutting down...");
    }

View Full Code Here


        MBeanServer mbeanServer = getMBeanServer();
        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,name=ProducerCache*");

        // number of producer caches
        Set<ObjectName> names = mbeanServer.queryNames(on, null);
        assertEquals(1, names.size());

        log.info("Adding 2nd route");

        // add a 2nd route
View Full Code Here

        template.sendBodyAndHeaders("direct:bar", "Hello World", headers);

        assertMockEndpointsSatisfied();

        // there should be two more producer cache
        names = mbeanServer.queryNames(on, null);
        assertEquals(3, names.size());

        // now stop and remove the 2nd route
        log.info("Stopping 2nd route");
        context.stopRoute("bar");
View Full Code Here

        boolean removed = context.removeRoute("bar");
        assertTrue(removed);

        // the producer cache should have been removed
        on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,name=ProducerCache*");
        names = mbeanServer.queryNames(on, null);
        assertEquals(1, names.size());

        log.info("Shutting down...");
    }

View Full Code Here

        MBeanServer mbeanServer = getMBeanServer();
        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,name=ProducerCache*");

        // number of producer caches
        Set<ObjectName> names = mbeanServer.queryNames(on, null);
        assertEquals(1, names.size());

        log.info("Adding 2nd route");

        // add a 2nd route
View Full Code Here

        template.sendBodyAndHeaders("direct:bar", "Hello World", headers);

        assertMockEndpointsSatisfied();

        // there should be two more producer cache
        names = mbeanServer.queryNames(on, null);
        assertEquals(3, names.size());

        // now stop and remove the 2nd route
        log.info("Stopping 2nd route");
        context.stopRoute("bar");
View Full Code Here

        boolean removed = context.removeRoute("bar");
        assertTrue(removed);

        // only the producer cache from the 2nd route should have been removed (the on exception becomes context scoped)
        on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,name=ProducerCache*");
        names = mbeanServer.queryNames(on, null);
        assertEquals(2, names.size());

        log.info("Shutting down...");
    }

View Full Code Here

        MBeanServer mbeanServer = getMBeanServer();
        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,name=ProducerCache*");

        // number of producer caches
        Set<ObjectName> names = mbeanServer.queryNames(on, null);
        assertEquals(1, names.size());

        log.info("Adding 2nd route");

        // add a 2nd route
View Full Code Here

        template.sendBodyAndHeaders("direct:bar", "Hello World", headers);

        assertMockEndpointsSatisfied();

        // there should be two more producer cache
        names = mbeanServer.queryNames(on, null);
        assertEquals(3, names.size());

        // now stop and remove the 2nd route
        log.info("Stopping 2nd route");
        context.stopRoute("bar");
View Full Code Here

        boolean removed = context.removeRoute("bar");
        assertTrue(removed);

        // the producer cache should have been removed
        on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,name=ProducerCache*");
        names = mbeanServer.queryNames(on, null);
        assertEquals(1, names.size());

        log.info("Shutting down...");
    }

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.