Examples of JolokiaServerConfig


Examples of org.jolokia.jvmagent.JolokiaServerConfig

        String autoStartS = finalConfig.remove("autoStart");
        boolean autoStart = true;
        if (autoStartS != null) {
            autoStart = Boolean.parseBoolean(autoStartS);
        }
        init(new JolokiaServerConfig(finalConfig),false);
        if (autoStart) {
            start();
        }
    }
View Full Code Here

Examples of org.jolokia.jvmagent.JolokiaServerConfig

    public void simple() throws Exception {
        System.setProperty("jolokia.port", "" + EnvTestUtil.getFreePort());
        System.out.println("Port selected: " + System.getProperty("jolokia.port"));
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("/spring-jolokia-context.xml");
        SpringJolokiaAgent server = (SpringJolokiaAgent) ctx.getBean("jolokia");
        JolokiaServerConfig cfg = server.getServerConfig();
        assertEquals(cfg.getContextPath(),"/j4p/");

        MBeanServer mbeanServer = (MBeanServer) ctx.getBean("jolokiaMBeanServer");
        assertNotNull(mbeanServer);
        checkServerAndStop(server);
    }
View Full Code Here

Examples of org.jolokia.jvmagent.JolokiaServerConfig

        configs.put("A", getConfig(true, 20, "executor", "fixed", "threadNr", "2"));
        expect(ctx.getBeansOfType(SpringJolokiaConfigHolder.class)).andReturn(configs);
        replay(ctx);
        server.setApplicationContext(ctx);
        server.afterPropertiesSet();
        JolokiaServerConfig cfg = server.getServerConfig();
        assertEquals(cfg.getExecutor(),"fixed");
        assertEquals(cfg.getThreadNr(),2);
        assertEquals(cfg.getContextPath(),"/j4p/");
        checkServerAndStop(server);
    }
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.