protected static Configuration updateResourceConfiguration(Resource resource, Configuration newConfiguration)
throws Exception {
ConfigurationManager configurationManager = PluginContainer.getInstance().getConfigurationManager();
ConfigurationUpdateRequest configurationUpdateRequest = new ConfigurationUpdateRequest(0, newConfiguration,
resource.getId());
configurationManager.updateResourceConfiguration(configurationUpdateRequest);
//give the component and the managed resource some time to properly persist the update
Thread.sleep(500);
return configurationManager.loadResourceConfiguration(resource.getId());