Author: ips
Date: 2008-11-14 14:07:14 -0500 (Fri, 14 Nov 2008)
New Revision: 50
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/manager/pc/PluginContainerResourceManager.java
Log:
add comment describing why we do a runtime scan after updating a resource's config
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/manager/pc/PluginContainerResourceManager.java
===================================================================
---
trunk/core/src/main/java/org/jboss/on/embedded/manager/pc/PluginContainerResourceManager.java 2008-11-14
19:06:48 UTC (rev 49)
+++
trunk/core/src/main/java/org/jboss/on/embedded/manager/pc/PluginContainerResourceManager.java 2008-11-14
19:07:14 UTC (rev 50)
@@ -139,7 +139,6 @@
resourceType = type;
}
}
-
return resourceType;
}
@@ -219,7 +218,6 @@
}
}
}
-
return result;
}
@@ -229,7 +227,6 @@
{
throw new IllegalArgumentException(CANNOT_BE_NULL);
}
-
Configuration configuration;
try
{
@@ -240,10 +237,8 @@
LOG.error(GET_RESOURCE_ERROR + resource, e);
throw new RuntimeException(e);
}
-
ConfigurationUtility.normalizeConfiguration(configuration,
resource.getResourceType().getResourceConfigurationDefinition());
-
return configuration;
}
@@ -264,7 +259,6 @@
LOG.error(REMOVE_RESOURCE_ERROR + resource, e);
throw new RuntimeException(e);
}
-
return response;
}
@@ -273,7 +267,6 @@
CreateResourceResponse response;
CreateResourceRequest request = new CreateResourceRequest(1,
ancestorResource.getId(), resourceName, resourceType.getName(), resourceType.getPlugin(),
pluginConfiguration, resourceConfiguration);
response = createResource(resourceType, request);
-
return response;
}
@@ -281,8 +274,7 @@
{
CreateResourceResponse response;
CreateResourceRequest request = new CreateResourceRequest(1,
parentResource.getId(), resourceName, resourceType.getName(), resourceType.getPlugin(),
pluginConfiguration, packageDetails);
- response = createResource(resourceType, request);
-
+ response = createResource(resourceType, request);
return response;
}
@@ -309,7 +301,6 @@
LOG.error(CANNOT_CREATE_REQUEST + e);
throw new RuntimeException(CANNOT_CREATE_REQUEST, e);
}
-
return response;
}
@@ -322,6 +313,7 @@
response =
getConfigService().executeUpdateResourceConfigurationImmediately(request);
if (response.getStatus() == ConfigurationUpdateStatus.SUCCESS)
{
+ // As ccrouch recalls, we do a service scan to pickup any change to the
updated Resource's name.
discoverServicesSync();
}
}
@@ -330,7 +322,6 @@
LOG.error(UPDATE_RESOURCE_ERROR);
throw new RuntimeException(UPDATE_RESOURCE_ERROR, e);
}
-
return response;
}
@@ -351,7 +342,6 @@
{
operationDefinitions = Collections.emptyList();
}
-
return operationDefinitions;
}