Examples of loadResourceConfiguration()


Examples of org.rhq.core.clientapi.agent.configuration.ConfigurationAgentService.loadResourceConfiguration()

            for (Resource service : server.getChildResources())
            {
                LOG.info("   Service: " + service.getName());

                Configuration serviceConfig = configService.loadResourceConfiguration(service.getId());
                logConfiguration(serviceConfig, "     ");
            }
        }
    }
View Full Code Here

Examples of org.rhq.core.clientapi.agent.configuration.ConfigurationAgentService.loadResourceConfiguration()


        PluginContainer pc = PluginContainer.getInstance();
        ConfigurationAgentService configService = pc.getConfigurationAgentService();

        Configuration configuration = configService.loadResourceConfiguration(defaultDs.getId());

        assert configuration != null : "Configuration for DefaultDS was null";

        assert configuration.getSimple("jndi-name").getStringValue().equals("DefaultDS") : "Property jndi-name was incorrect";
        assert configuration.getSimple("connection-url").getStringValue().equals("jdbc:hsqldb:hsql://${jboss.bind.address}:1701")
View Full Code Here

Examples of org.rhq.core.clientapi.agent.configuration.ConfigurationAgentService.loadResourceConfiguration()

        Resource defaultDs = findService("DefaultDS", SERVER_NAME, platform);

        PluginContainer pc = PluginContainer.getInstance();
        ConfigurationAgentService configService = pc.getConfigurationAgentService();

        Configuration configuration = configService.loadResourceConfiguration(defaultDs.getId());

        // Sanity check, to make sure jndi name is as we expect it
        assert configuration != null : "Configuration for Default DS was null";
        assert configuration.getSimple("jndi-name").getStringValue().equals("DefaultDS") : "Property jndiName was incorrect";
View Full Code Here

Examples of org.rhq.core.clientapi.agent.configuration.ConfigurationAgentService.loadResourceConfiguration()

        ConfigurationUpdateRequest cur = new ConfigurationUpdateRequest(0, configuration, defaultDs.getId());

        configService.updateResourceConfiguration(cur);

        // Verify changes are in place
        configuration = configService.loadResourceConfiguration(defaultDs.getId());

        assert configuration.getSimple("jndi-name").getStringValue().equals("TestDS") : "Updated property jndiName was incorrect";
        assert configuration.getSimple("max-pool-size").getStringValue().equals("100") : "Updated property max-pool-size was incorrect";
        // Rollback changes (find a better way of doing this)
        configuration.put(new PropertySimple("jndi-name", "DefaultDS"));
View Full Code Here

Examples of org.rhq.core.clientapi.agent.configuration.ConfigurationAgentService.loadResourceConfiguration()

        Resource testDs = findService(dsName, SERVER_NAME, platform);

        pc = PluginContainer.getInstance();
        ConfigurationAgentService configService = pc.getConfigurationAgentService();

        Configuration configuration = configService.loadResourceConfiguration(testDs.getId());

        assert configuration.getSimple("jndi-name").getStringValue().equals(dsName) : "Property jndi-name was incorrect";
        assert configuration.getSimple("connection-url").getStringValue().equals("jdbc:hsqldb:hsql://${jboss.bind.address}:1701")
                : "Property connection-url was incorrect";
        assert configuration.getSimple("user-name").getStringValue().equals("userJoe") : "Property user-name was incorrect";
View Full Code Here

Examples of org.rhq.core.pc.configuration.ConfigurationManager.loadResourceConfiguration()

            Resource resourceUnderTest = unparsedResources.poll();

            addCommitedChildrenToCollection(unparsedResources, resourceUnderTest, ignoredResources);

            if (resourceUnderTest.getResourceType().getResourceConfigurationDefinition() != null) {
                Configuration configUnderTest = configManager.loadResourceConfiguration(resourceUnderTest.getId());

                ConfigurationUpdateRequest updateRequest = new ConfigurationUpdateRequest(1, configUnderTest,
                    resourceUnderTest.getId());
                ConfigurationUpdateResponse updateResponse = configManager
                    .executeUpdateResourceConfigurationImmediately(updateRequest);
View Full Code Here

Examples of org.rhq.core.pc.configuration.ConfigurationManager.loadResourceConfiguration()

            Resource moduleOptionsTypeResource = getModuleOptionTypeResource(attribute);
            //assert non-zero id returned
            assert moduleOptionsTypeResource.getId() != 0 : "The resource was not properly initialized. Expected id != 0";

            //Now request the resource complete with resource config
            Configuration loadedConfiguration = testConfigurationManager
                .loadResourceConfiguration(moduleOptionsTypeResource.getId());
            String code = null;
            String type = null;
            String flag = null;
            //populate the associated attributes if it's supported.
View Full Code Here

Examples of org.rhq.core.pc.configuration.ConfigurationManager.loadResourceConfiguration()

            Resource moduleOptionsResource = getModuleOptionsResource(moduleOptionsTypeResource, attribute);
            //assert non-zero id returned
            assert moduleOptionsResource.getId() != 0 : "The resource was not properly initialized. Expected id != 0";
            //fetch configuration for module options
            //Now request the resource complete with resource config
            Configuration loadedOptionsConfiguration = testConfigurationManager
                .loadResourceConfiguration(moduleOptionsResource.getId());
            for (String key : loadedOptionsConfiguration.getAllProperties().keySet()) {
                //retrieve the open map of Module Options
                PropertyMap map = ((PropertyMap) loadedOptionsConfiguration.getAllProperties().get(key));
                LinkedHashMap<String, Object> options = moduleOptionType.getOptions();
View Full Code Here

Examples of org.rhq.core.pc.configuration.ConfigurationManager.loadResourceConfiguration()

        Map<String, Configuration> configs = new HashMap<String, Configuration>();
       
        ConfigurationManager configurationManager = PluginContainer.getInstance().getConfigurationManager();
       
        for(Resource sbs : getResources(sbsResourceType)) {
            Configuration config = configurationManager.loadResourceConfiguration(sbs.getId());
            String name = config.getSimpleValue("name", null);
            configs.put(name, config);
        }
        return configs;
    }
View Full Code Here

Examples of org.rhq.core.pc.configuration.ConfigurationManager.loadResourceConfiguration()

        ResourceFactoryManager resourceFactory = PluginContainer.getInstance().getResourceFactoryManager();
        ConfigurationManager configurationManager = PluginContainer.getInstance().getConfigurationManager();
       
        for(Resource sbs : getResources(sbsResourceType)) {
            Configuration config = configurationManager.loadResourceConfiguration(sbs.getId());
            String name = config.getSimpleValue("name", null);
           
            Configuration originalConfiguration = originalBindingSets.get(name);
            if(originalConfiguration != null) {
                updateResourceConfiguration(sbs, originalConfiguration);
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.