Examples of loadResourceConfiguration()


Examples of org.rhq.core.pluginapi.configuration.ConfigurationFacet.loadResourceConfiguration()

        int beforePid = config.getSimple(TestComponent.CURRENT_PID_PROP).getIntegerValue();
       
        stopTestProcess();  
        startTestProcess();
       
        config = component.loadResourceConfiguration();
       
        int afterDiscoveryCallCount = config.getSimple(TestComponent.DISCOVERY_CALL_COUNT_PROP).getIntegerValue();
        int afterPid = config.getSimple(TestComponent.CURRENT_PID_PROP).getIntegerValue();
       
        Assert.assertEquals(afterDiscoveryCallCount, beforeDiscoveryCallCount + 1, "Only a single discovery call should have been made to refresh the process info");
View Full Code Here

Examples of org.rhq.core.pluginapi.configuration.ConfigurationFacet.loadResourceConfiguration()

    public void testProcessInfoAccurateWhenProcessStopped() throws Exception {
        Assert.assertEquals(components.size(), 1, "There should be exactly 1 resource discovered");
       
        ConfigurationFacet component = components.iterator().next();
       
        Configuration config = component.loadResourceConfiguration();
       
        int beforeDiscoveryCallCount = config.getSimple(TestComponent.DISCOVERY_CALL_COUNT_PROP).getIntegerValue();
       
        stopTestProcess();  
       
View Full Code Here

Examples of org.rhq.core.pluginapi.configuration.ConfigurationFacet.loadResourceConfiguration()

       
        int beforeDiscoveryCallCount = config.getSimple(TestComponent.DISCOVERY_CALL_COUNT_PROP).getIntegerValue();
       
        stopTestProcess();  
       
        config = component.loadResourceConfiguration();
       
        int afterDiscoveryCallCount = config.getSimple(TestComponent.DISCOVERY_CALL_COUNT_PROP).getIntegerValue();
        int afterPid = config.getSimple(TestComponent.CURRENT_PID_PROP).getIntegerValue();
       
        Assert.assertEquals(afterDiscoveryCallCount, beforeDiscoveryCallCount, "No discovery call should have been made to refresh the process info if the process no longer exists");
View Full Code Here

Examples of org.rhq.core.pluginapi.configuration.ConfigurationFacet.loadResourceConfiguration()

    public void testProcessInfoAccurateAfterProcessStarted() throws Exception {
        Assert.assertEquals(components.size(), 1, "There should be exactly 1 resource discovered");
       
        ConfigurationFacet component = components.iterator().next();
       
        Configuration config = component.loadResourceConfiguration();
       
        int beforeDiscoveryCallCount = config.getSimple(TestComponent.DISCOVERY_CALL_COUNT_PROP).getIntegerValue();
       
        stopTestProcess();  
       
View Full Code Here

Examples of org.rhq.core.pluginapi.configuration.ConfigurationFacet.loadResourceConfiguration()

       
        int beforeDiscoveryCallCount = config.getSimple(TestComponent.DISCOVERY_CALL_COUNT_PROP).getIntegerValue();
       
        stopTestProcess();  
       
        config = component.loadResourceConfiguration();
       
        int afterDiscoveryCallCount = config.getSimple(TestComponent.DISCOVERY_CALL_COUNT_PROP).getIntegerValue();
        int afterPid = config.getSimple(TestComponent.CURRENT_PID_PROP).getIntegerValue();
       
        Assert.assertEquals(afterDiscoveryCallCount, beforeDiscoveryCallCount, "No discovery call should have been made to refresh the process info if the process no longer exists");
View Full Code Here

Examples of org.rhq.core.pluginapi.configuration.ConfigurationFacet.loadResourceConfiguration()

        Assert.assertEquals(afterDiscoveryCallCount, beforeDiscoveryCallCount, "No discovery call should have been made to refresh the process info if the process no longer exists");
        Assert.assertEquals(afterPid, 0, "The process info should have been nulled out")
       
        startTestProcess();

        config = component.loadResourceConfiguration();
       
        afterDiscoveryCallCount = config.getSimple(TestComponent.DISCOVERY_CALL_COUNT_PROP).getIntegerValue();
        afterPid = config.getSimple(TestComponent.CURRENT_PID_PROP).getIntegerValue();
       
        Assert.assertEquals(afterDiscoveryCallCount, beforeDiscoveryCallCount + 1, "Exactly 1 discovery call should have been made to refresh the process info after the process started again.");
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.ConfigurationLoadDelegate.loadResourceConfiguration()

        ConfigurationDefinition configDef = loadServiceDescriptor("SocketBindingGroupDomain");

        Address a = new Address("socket-binding-group=standard-sockets");
        ConfigurationLoadDelegate loadDelegate = new ConfigurationLoadDelegate(configDef,
            getDomainControllerASConnection(), a);
        Configuration conf = loadDelegate.loadResourceConfiguration();

        assert conf != null : "Did not get a configuration back";
        PropertySimple ps = conf.getSimple("default-interface");
        assert ps != null : "No property 'default-interface' found";
        String tmp = ps.getStringValue();
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.ConfigurationLoadDelegate.loadResourceConfiguration()

        ConfigurationDefinition configDef = loadServiceDescriptor("SocketBindingGroupDomain");

        Address a = new Address("socket-binding-group=standard-sockets");
        ConfigurationLoadDelegate loadDelegate = new ConfigurationLoadDelegate(configDef,
            getDomainControllerASConnection(), a);
        Configuration conf = loadDelegate.loadResourceConfiguration();

        assert conf != null : "Did not get a configuration back";

        PropertyList pl = conf.getList("*");
        assert pl != null;
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.ConfigurationLoadDelegate.loadResourceConfiguration()

        cwd.updateResourceConfiguration(report);
        assert report.getStatus() == ConfigurationUpdateStatus.SUCCESS;

        // now check the result (and change back)

        Configuration conf2 = loadDelegate.loadResourceConfiguration();
        assert conf2 != null : "Did not get a configuration back";
        List<Property> pl2 = conf.getList("*").getList();
        for (Property p : pl2) {
            PropertyMap pm = (PropertyMap) p;
            Map<String, Property> pmap = pm.getMap();
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.ManagedASComponent.loadResourceConfiguration()

        int port;
        String username, password;
        if (parentComponent instanceof ManagedASComponent) {
            ManagedASComponent managedASComponent = (ManagedASComponent) parentComponent;
            Configuration managedASConfig = managedASComponent.loadResourceConfiguration();
            PropertySimple offsetProp = managedASConfig.getSimple(MANAGED_SERVER_PORT_OFFSET_PROPERTY_NAME);
            if (offsetProp == null) {
                LOG.warn("Could not find Managed Server socket binding offset, skipping discovery");
                return Collections.emptySet();
            }
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.