modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
| 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit c7a6065e78a9e96a83bec83e3329a05cb107e025
Author: John Sanda <john(a)localhost.localdomain>
Date: Tue Mar 2 12:32:13 2010 -0500
Modifying resource config update operations to validate configs that support raw-only
and structured-only
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
index ea805b1..37e4054 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
@@ -1035,6 +1035,12 @@ public class ConfigurationManagerBean implements
ConfigurationManagerLocal, Conf
+ "whether the structured or raw was updated.");
}
+ Resource resource = entityManager.find(Resource.class, resourceId);
+ ConfigurationDefinition configDef =
resource.getResourceType().getResourceConfigurationDefinition();
+ boolean isStructured = configDef.getConfigurationFormat() ==
ConfigurationFormat.STRUCTURED;
+
+ validateResourceConfiguration(subject, resourceId, newConfiguration,
isStructured);
+
// must do this in a separate transaction so it is committed prior to sending the
agent request
// (consider synchronizing to avoid the condition where someone calls this method
twice quickly
// in two different txs which would put two updates in INPROGRESS and cause
havoc)
Show replies by date