summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Negrea <snegrea@redhat.com>2012-08-29 03:59:02 (GMT)
committerStefan Negrea <snegrea@redhat.com>2012-08-29 03:59:02 (GMT)
commita31197fcd63548c6e49606525b9938c123e5ffb2 (patch)
treec1077a4d3575d41cc8302a01ae0b5aa8fe76ce6e
parent91aaaf71e585022ca85f62e371a7d63ae554ff6d (diff)
downloadrhq-a31197fcd63548c6e49606525b9938c123e5ffb2.zip
rhq-a31197fcd63548c6e49606525b9938c123e5ffb2.tar.gz
rhq-a31197fcd63548c6e49606525b9938c123e5ffb2.tar.xz
[BZ 852552] Update socket binding group to not send at all port-offset for non-standalone servers.
Just setting port-offset to null was not enough since now all the unset properties are sent to the AS7 server. The property and property definition are now removed from updates sent host controllers.
-rw-r--r--modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SocketBindingGroupComponent.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SocketBindingGroupComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SocketBindingGroupComponent.java
index 00d28ca..573db2e 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SocketBindingGroupComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SocketBindingGroupComponent.java
@@ -2,6 +2,7 @@ package org.rhq.modules.plugins.jbossas7;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
@@ -29,12 +30,14 @@ public class SocketBindingGroupComponent extends BaseComponent implements Config
public void updateResourceConfiguration(ConfigurationUpdateReport report) {
Configuration config = report.getConfiguration();
+ ConfigurationDefinition configDef = context.getResourceType().getResourceConfigurationDefinition();
+
if (!(context.getParentResourceComponent() instanceof StandaloneASComponent)) { // TODO what about managed servers
- config.put(new PropertySimple("port-offset",null));
+ configDef.getPropertyDefinitions().remove("port-offset");
+ config.remove("port-offset");
}
- super.updateResourceConfiguration(report);
-
-
+ ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(configDef, getASConnection(), address);
+ delegate.updateResourceConfiguration(report);
}
}