Package org.mule.module.management.agent

Examples of org.mule.module.management.agent.JmxApplicationAgent


            config.setId(null);
            MuleContextBuilder contextBuilder = new DefaultMuleContextBuilder();
            contextBuilder.setMuleConfiguration(config);
            muleContext = new DefaultMuleContextFactory().createMuleContext(contextBuilder);

            JmxApplicationAgent jmxAgent = new JmxApplicationAgent();
            muleContext.getRegistry().registerAgent(jmxAgent);

            muleContext.start();
           
            fail("Should have failed.");
View Full Code Here


    @Override
    protected void doSetUp() throws Exception
    {
        super.doSetUp();
        JmxApplicationAgent jmxAgent = (JmxApplicationAgent) muleContext.getRegistry().lookupAgent("jmx-agent");
        jmxSupport = jmxAgent.getJmxSupportFactory().getJmxSupport();
        domainName = jmxSupport.getDomainName(muleContext);
        mBeanServer = jmxAgent.getMBeanServer();
    }
View Full Code Here

    }

    @Test
    public void testAgentConfiguration() throws MuleException
    {
        JmxApplicationAgent agent = muleContext.getRegistry().lookupObject(JmxApplicationAgent.class);
        assertNotNull(agent);
        assertNotNull(agent.getConnectorServerUrl());
        assertEquals("service:jmx:rmi:///jndi/rmi://0.0.0.0:1100/server", agent.getConnectorServerUrl());
        assertNotNull(agent.getConnectorServerProperties());
        assertEquals("true", agent.getConnectorServerProperties().get("jmx.remote.jndi.rebind"));
    }
View Full Code Here

    public void testCustomJMXAuthenticatorConfig() throws Exception
    {
        Agent agent = muleContext.getRegistry().lookupAgent("jmx-agent");
        assertNotNull(agent);
        assertEquals(JmxApplicationAgent.class, agent.getClass());
        JmxApplicationAgent jmxAgent = (JmxApplicationAgent) agent;
        assertEquals(CustomJMXAuthenticator.class, jmxAgent.getJmxAuthenticator().getClass());
    }
View Full Code Here

    public void testSimpleJmxAgentConfig() throws Exception
    {
        Agent agent = muleContext.getRegistry().lookupObject(JmxApplicationAgent.class);
        assertNotNull(agent);
        assertEquals(JmxApplicationAgent.class, agent.getClass());
        JmxApplicationAgent jmxAgent = (JmxApplicationAgent) agent;
        assertFalse(jmxAgent.isCreateServer());
        assertTrue(jmxAgent.isLocateServer());
        assertTrue(jmxAgent.isEnableStatistics());
        assertEquals("some://test.url", jmxAgent.getConnectorServerUrl());

        agent = muleContext.getRegistry().lookupAgent("jmx-log4j");
        assertNotNull(agent);
        assertEquals(Log4jAgent.class, agent.getClass());
View Full Code Here

    public void testDefaultJmxAgentConfig() throws Exception
    {
        Agent agent = muleContext.getRegistry().lookupAgent("jmx-agent");
        assertNotNull(agent);
        assertEquals(JmxApplicationAgent.class, agent.getClass());
        JmxApplicationAgent jmxAgent = (JmxApplicationAgent) agent;
       
        assertEquals(false, jmxAgent.isCreateServer());
        assertEquals(true, jmxAgent.isLocateServer());
        assertEquals(true, jmxAgent.isEnableStatistics());
        assertEquals(SimplePasswordJmxAuthenticator.class, jmxAgent.getJmxAuthenticator().getClass());

        agent = muleContext.getRegistry().lookupAgent(JmxServerNotificationAgent.DEFAULT_AGENT_NAME);
        assertNotNull(agent);
        assertEquals(JmxServerNotificationAgent.class, agent.getClass());
View Full Code Here

TOP

Related Classes of org.mule.module.management.agent.JmxApplicationAgent

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.