Examples of ManagementAgent


Examples of org.apache.camel.spi.ManagementAgent

    protected boolean useJmx() {
        return true;
    }

    public void testJmxConfiguration() throws Exception {
        ManagementAgent agent = getMandatoryBean(DefaultManagementAgent.class, "agent");
        assertNotNull("SpringInstrumentationAgent must be configured for JMX support", agent);
        assertNotNull("MBeanServer must be configured for JMX support", agent.getMBeanServer());
        assertEquals("org.apache.camel.test", agent.getMBeanServer().getDefaultDomain());
    }
View Full Code Here

Examples of org.apache.camel.spi.ManagementAgent

        if (getCamelContext().getStatus().isStarting()) {
            return true;
        }

        // register if always is enabled
        ManagementAgent agent = getManagementStrategy().getManagementAgent();
        if (agent.getRegisterAlways()) {
            return true;
        }

        // is it a known route then always accept
        if (route != null && knowRouteIds.contains(route.getId())) {
            return true;
        }

        // only register if we are starting a new route, and current thread is in starting routes mode
        if (agent.getRegisterNewRoutes()) {
            // no specific route, then fallback to see if this thread is starting routes
            // which is kept as state on the camel context
            return getCamelContext().isStartingRoutes();
        }
View Full Code Here

Examples of org.apache.camel.spi.ManagementAgent

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class JmxInstrumentationWithConnectorTest extends EndpointReferenceTest {

    public void testJmxConfiguration() throws Exception {
        ManagementAgent agent = getMandatoryBean(DefaultManagementAgent.class, "agent");
        assertNotNull("SpringInstrumentationAgent must be configured for JMX support", agent);
        assertNotNull("MBeanServer must be configured for JMX support", agent.getMBeanServer());
        assertEquals("org.apache.camel.test", agent.getMBeanServer().getDefaultDomain());
    }
View Full Code Here

Examples of org.apache.camel.spi.ManagementAgent

        if (getCamelContext().getStatus().isStarting()) {
            return true;
        }

        // register if always is enabled
        ManagementAgent agent = getManagementStrategy().getManagementAgent();
        if (agent.getRegisterAlways()) {
            return true;
        }

        // is it a known route then always accept
        if (route != null && knowRouteIds.contains(route.getId())) {
            return true;
        }

        // only register if we are starting a new route, and current thread is in starting routes mode
        if (agent.getRegisterNewRoutes()) {
            // no specific route, then fallback to see if this thread is starting routes
            // which is kept as state on the camel context
            return getCamelContext().isStartingRoutes();
        }
View Full Code Here

Examples of org.apache.camel.spi.ManagementAgent

    protected boolean useJmx() {
        return true;
    }

    public void testJmxConfiguration() throws Exception {
        ManagementAgent agent = getMandatoryBean(DefaultManagementAgent.class, "agent");
        assertNotNull("SpringInstrumentationAgent must be configured for JMX support", agent);
        assertNotNull("MBeanServer must be configured for JMX support", agent.getMBeanServer());
        assertEquals("org.apache.camel.test", agent.getMBeanServer().getDefaultDomain());
    }
View Full Code Here

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

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

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

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

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
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.