Package org.rhq.core.clientapi.agent.configuration

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



        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

        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

        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

        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

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.