Package org.apache.camel.spi

Examples of org.apache.camel.spi.ManagementAgent


        // If null, provide the default implementation.
        if (mbContainer == null) {
            MBeanServer mbs = null;
           
            final ManagementStrategy mStrategy = this.getCamelContext().getManagementStrategy();
            final ManagementAgent mAgent = mStrategy.getManagementAgent();
            if (mAgent != null) {
                mbs = mAgent.getMBeanServer();
            }
           
            if (mbs != null) {
                mbContainer = new MBeanContainer(mbs);
                startMbContainer();
View Full Code Here


        context.setNameStrategy(new ExplicitCamelContextNameStrategy("myCamelContextName"));

        final ManagementStrategy managementStrategy = context.getManagementStrategy();

        final ManagementAgent managementAgent = managementStrategy.getManagementAgent();
        managementAgent.setMBeanServerDefaultDomain("org.apache.camel");

        final ManagementNameStrategy managementNameStrategy = context.getManagementNameStrategy();
        managementNameStrategy.setNamePattern("CustomName-#name#");

        // Add a simple test route
View Full Code Here

        // Configure JMX settings
        final ManagementStrategy managementStrategy = context.getManagementStrategy();
        managementStrategy.setStatisticsLevel(ManagementStatisticsLevel.All);
        managementStrategy.setLoadStatisticsEnabled(true);

        final ManagementAgent managementAgent = managementStrategy.getManagementAgent();
        managementAgent.setConnectorPort(1099);
        managementAgent.setServiceUrlPath("/jmxrmi/camel");
        managementAgent.setCreateConnector(false);
        managementAgent.setUsePlatformMBeanServer(true);

        // Add a simple test route
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
View Full Code Here

        camelApp = null;
    }

    @Test
    public void testNamingContext() throws Exception {
        final ManagementAgent managementAgent = context.getManagementStrategy().getManagementAgent();
        assertNotNull(managementAgent);

        final MBeanServer mBeanServer = managementAgent.getMBeanServer();
        assertNotNull(mBeanServer);

        final String mBeanServerDefaultDomain = managementAgent.getMBeanServerDefaultDomain();
        assertEquals("org.apache.camel", mBeanServerDefaultDomain);

        final String managementName = context.getManagementName();
        assertNotNull("CamelContext should have a management name if JMX is enabled", managementName);
        LOG.info("managementName = {}", managementName);
View Full Code Here

        return camelContext;
    }

    @Test
    public void testNamingPatternSpring() throws Exception {
        final ManagementAgent managementAgent = context.getManagementStrategy().getManagementAgent();
        assertNotNull(managementAgent);

        final MBeanServer mBeanServer = managementAgent.getMBeanServer();
        assertNotNull(mBeanServer);

        final String mBeanServerDefaultDomain = managementAgent.getMBeanServerDefaultDomain();
        assertEquals("org.apache.camel", mBeanServerDefaultDomain);

        final String managementName = context.getManagementName();
        assertNotNull("CamelContext should have a management name if JMX is enabled", managementName);
        LOG.info("managementName = {}; name = {}", managementName, context.getName());
View Full Code Here

        camelApp = null;
    }

    @Test
    public void testNamingPattern() throws Exception {
        final ManagementAgent managementAgent = context.getManagementStrategy().getManagementAgent();

        assertNotNull(managementAgent);

        final MBeanServer mBeanServer = managementAgent.getMBeanServer();
        assertNotNull(mBeanServer);

        final String mBeanServerDefaultDomain = managementAgent.getMBeanServerDefaultDomain();
        assertEquals("org.apache.camel", mBeanServerDefaultDomain);

        final String managementName = context.getManagementName();
        assertNotNull("CamelContext should have a management name if JMX is enabled", managementName);
        LOG.info("managementName = {}; name = {}", managementName, context.getName());
View Full Code Here

        return context;
    }

    @Test
    public void testMonitorSpring() throws Exception {
        final ManagementAgent managementAgent = context.getManagementStrategy().getManagementAgent();
        assertNotNull(managementAgent);

        final MBeanServer mBeanServer = managementAgent.getMBeanServer();
        assertNotNull(mBeanServer);

        final String mBeanServerDefaultDomain = managementAgent.getMBeanServerDefaultDomain();
        assertEquals("org.apache.camel", mBeanServerDefaultDomain);

        final String managementName = context.getManagementName();
        log.info("managementName = {}", managementName);
View Full Code Here

        return camelContext;
    }

    @Test
    public void testManagedResource() throws Exception {
        final ManagementAgent managementAgent = context.getManagementStrategy().getManagementAgent();
        assertNotNull(managementAgent);

        final MBeanServer mBeanServer = managementAgent.getMBeanServer();
        assertNotNull(mBeanServer);

        final String mBeanServerDefaultDomain = managementAgent.getMBeanServerDefaultDomain();
        assertEquals("org.apache.camel", mBeanServerDefaultDomain);

        final String managementName = context.getManagementName();
        assertNotNull("CamelContext should have a management name if JMX is enabled", managementName);
        LOG.info("managementName = {}", managementName);
View Full Code Here

        return context;
    }

    @Test
    public void testMonitor() throws Exception {
        final ManagementAgent managementAgent = context.getManagementStrategy().getManagementAgent();
        assertNotNull(managementAgent);

        final MBeanServer mBeanServer = managementAgent.getMBeanServer();
        assertNotNull(mBeanServer);

        final String mBeanServerDefaultDomain = managementAgent.getMBeanServerDefaultDomain();
        assertEquals("org.apache.camel", mBeanServerDefaultDomain);

        final String managementName = context.getManagementName();
        log.info("managementName = {}", managementName);
View Full Code Here

        return camelContext;
    }

    @Test
    public void testManagedResource() throws Exception {
        final ManagementAgent managementAgent = context.getManagementStrategy().getManagementAgent();
        assertNotNull(managementAgent);

        final MBeanServer mBeanServer = managementAgent.getMBeanServer();
        assertNotNull(mBeanServer);

        final String mBeanServerDefaultDomain = managementAgent.getMBeanServerDefaultDomain();
        assertEquals("org.apache.camel", mBeanServerDefaultDomain);

        final String managementName = context.getManagementName();
        assertNotNull("CamelContext should have a management name if JMX is enabled", managementName);
        LOG.info("managementName = {}", managementName);
View Full Code Here

TOP

Related Classes of org.apache.camel.spi.ManagementAgent

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.