Examples of RuntimeConfigurationViewMBean


Examples of org.apache.activemq.plugin.jmx.RuntimeConfigurationViewMBean

        // apply via jmx
        ObjectName objectName =
                new ObjectName(brokerService.getBrokerObjectName().toString() +
                        RuntimeConfigurationBroker.objectNamePropsAppendage);
        RuntimeConfigurationViewMBean runtimeConfigurationView =
                (RuntimeConfigurationViewMBean) brokerService.getManagementContext().newProxyInstance(objectName,
                        RuntimeConfigurationViewMBean.class, false);

        String propOfInterest = "modified";
        HashMap<String, String> props = new HashMap<String, String>();
        IntrospectionSupport.getProperties(runtimeConfigurationView, props, null);
        LOG.info("mbean attributes before: " + props);

        assertNotEquals("unknown", props.get(propOfInterest));

        String result = runtimeConfigurationView.updateNow();

        LOG.info("Result from update: " + result);

        assertTrue("got sensible result", result.contains("No material change"));
View Full Code Here

Examples of org.apache.activemq.plugin.jmx.RuntimeConfigurationViewMBean

        assertTrue("broker alive", brokerService.isStarted());

        ObjectName objectName =
                new ObjectName(brokerService.getBrokerObjectName().toString() +
                        RuntimeConfigurationBroker.objectNamePropsAppendage);
        RuntimeConfigurationViewMBean runtimeConfigurationView =
                (RuntimeConfigurationViewMBean) brokerService.getManagementContext().newProxyInstance(objectName,
                        RuntimeConfigurationViewMBean.class, false);

        String propOfInterest = "modified";
        HashMap<String, String> props = new HashMap<String, String>();
View Full Code Here

Examples of org.apache.activemq.plugin.jmx.RuntimeConfigurationViewMBean

        assertTrue("broker alive", brokerService.isStarted());

        ObjectName objectName =
                new ObjectName(brokerService.getBrokerObjectName().toString() +
                        RuntimeConfigurationBroker.objectNamePropsAppendage);
        RuntimeConfigurationViewMBean runtimeConfigurationView =
                (RuntimeConfigurationViewMBean) brokerService.getManagementContext().newProxyInstance(objectName,
                        RuntimeConfigurationViewMBean.class, false);

        String propOfInterest = "modified";
        HashMap<String, String> props = new HashMap<String, String>();
View Full Code Here

Examples of org.apache.activemq.plugin.jmx.RuntimeConfigurationViewMBean

        // apply via jmx
        ObjectName objectName =
                new ObjectName(brokerService.getBrokerObjectName().toString() +
                        RuntimeConfigurationBroker.objectNamePropsAppendage);
        RuntimeConfigurationViewMBean runtimeConfigurationView =
                (RuntimeConfigurationViewMBean) brokerService.getManagementContext().newProxyInstance(objectName,
                        RuntimeConfigurationViewMBean.class, false);

        String propOfInterest = "modified";
        HashMap<String, String> props = new HashMap<String, String>();
        IntrospectionSupport.getProperties(runtimeConfigurationView, props, null);
        LOG.info("mbean attributes before: " + props);

        assertNotEquals("unknown", props.get(propOfInterest));

        String result = runtimeConfigurationView.updateNow();

        LOG.info("Result from update: " + result);

        assertTrue("got sensible result", result.contains("No material change"));
View Full Code Here

Examples of org.apache.activemq.plugin.jmx.RuntimeConfigurationViewMBean

        assertTrue("broker alive", brokerService.isStarted());

        ObjectName objectName =
                        new ObjectName(brokerService.getBrokerObjectName().toString() +
                                RuntimeConfigurationBroker.objectNamePropsAppendage);
                RuntimeConfigurationViewMBean runtimeConfigurationView =
                        (RuntimeConfigurationViewMBean) brokerService.getManagementContext().newProxyInstance(objectName,
                                RuntimeConfigurationViewMBean.class, false);

                String propOfInterest = "modified";
                HashMap<String, String> props = new HashMap<String, String>();
View Full Code Here

Examples of org.apache.activemq.plugin.jmx.RuntimeConfigurationViewMBean

        // apply via jmx
        ObjectName objectName =
                new ObjectName(brokerService.getBrokerObjectName().toString() +
                        RuntimeConfigurationBroker.objectNamePropsAppendage);
        RuntimeConfigurationViewMBean runtimeConfigurationView =
                (RuntimeConfigurationViewMBean) brokerService.getManagementContext().newProxyInstance(objectName,
                        RuntimeConfigurationViewMBean.class, false);

        HashMap<String, String> props = new HashMap<String, String>();
        IntrospectionSupport.getProperties(runtimeConfigurationView, props, null);
        LOG.info("mbean attributes before: " + props);

        String result = runtimeConfigurationView.updateNow();

        LOG.info("Result from update: " + result);

        assertTrue("got sensible result: " + result, result.contains("started"));
View Full Code Here

Examples of org.apache.activemq.plugin.jmx.RuntimeConfigurationViewMBean

        // apply via jmx
        ObjectName objectName =
                new ObjectName(brokerService.getBrokerObjectName().toString() +
                        RuntimeConfigurationBroker.objectNamePropsAppendage);
        RuntimeConfigurationViewMBean runtimeConfigurationView =
                (RuntimeConfigurationViewMBean) brokerService.getManagementContext().newProxyInstance(objectName,
                        RuntimeConfigurationViewMBean.class, false);

        HashMap<String, String> props = new HashMap<String, String>();
        IntrospectionSupport.getProperties(runtimeConfigurationView, props, null);
        LOG.info("mbean attributes before: " + props);

        String result = runtimeConfigurationView.updateNow();
        LOG.info("Result from failed update: " + result);

        assertTrue("got sensible result: " + result, result.contains("dudElement"));

        HashMap<String, String> propsAfter = new HashMap<String, String>();
        IntrospectionSupport.getProperties(runtimeConfigurationView, propsAfter, null);

        LOG.info("mbean attributes after: " + propsAfter);
        String propOfInterest = "modified";
        assertEquals("modified is same", props.get(propOfInterest), propsAfter.get(propOfInterest));

        // apply good change now
        applyNewConfig(brokerConfig, "networkConnectorTest-one-nc", SLEEP);

        result = runtimeConfigurationView.updateNow();

        LOG.info("Result from update: " + result);
        assertTrue("got sensible result: " + result, result.contains("started"));
        assertEquals("one new network connectors", 1, brokerService.getNetworkConnectors().size());
View Full Code Here

Examples of org.apache.activemq.plugin.jmx.RuntimeConfigurationViewMBean

        // verify runtimeConfig active
        ObjectName objectName =
                new ObjectName(brokerService.getBrokerObjectName().toString() +
                        RuntimeConfigurationBroker.objectNamePropsAppendage);
        RuntimeConfigurationViewMBean runtimeConfigurationView =
                (RuntimeConfigurationViewMBean) brokerService.getManagementContext().newProxyInstance(objectName,
                        RuntimeConfigurationViewMBean.class, false);

        HashMap<String, String> props = new HashMap<String, String>();
        IntrospectionSupport.getProperties(runtimeConfigurationView, props, null);
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.