diff --git a/modules/plugins/wfly-10/src/main/java/org/rhq/modules/plugins/wildfly10/TransactionsComponent.java b/modules/plugins/wfly-10/src/main/java/org/rhq/modules/plugins/wildfly10/TransactionsComponent.java index 5285f55314f..9f8100756c2 100644 --- a/modules/plugins/wfly-10/src/main/java/org/rhq/modules/plugins/wildfly10/TransactionsComponent.java +++ b/modules/plugins/wfly-10/src/main/java/org/rhq/modules/plugins/wildfly10/TransactionsComponent.java @@ -30,10 +30,13 @@ * * The special case for this subsystem: * - * If [process-id-uuid] == true then do not send updates for [process-id-socket-binding], this property - * will be undefined by the AS7 on the next server reload/restart + * If [process-id-uuid] == true then: + * - Do not send updates for [process-id-socket-binding], this property + * will be undefined by the AS7 on the next server reload/restart + * - Do not send updates for [process-id-socket-max-ports], this property + * requires to be undefined on this case. EAP will assign 10 * - * If [process-id-uuid] == false then send [process-id-socket-binding] value and + * If [process-id-uuid] == false then send [process-id-socket-binding] value, [process-id-socket-max-ports] value and * allow AS7 to perform property validation * * @@ -54,9 +57,31 @@ public void updateResourceConfiguration(ConfigurationUpdateReport report) { //a validation error on the server. configDef.getPropertyDefinitions().remove("process-id-socket-binding"); config.remove("process-id-socket-binding"); + //Also do not send updates for [process-id-socket-max-ports] because EAP expects it to + //be undefined and will assign 10 anyway. + configDef.getPropertyDefinitions().remove("process-id-socket-max-ports"); + config.remove("process-id-socket-max-ports"); + } else { + //EAP7 requires to unset [process-id-uuid] to allow setting [process-id-socket-binding] + config.getSimple("process-id-uuid").setValue(null); } ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(configDef, getASConnection(), address); delegate.updateResourceConfiguration(report); } + + @Override + public Configuration loadResourceConfiguration() throws Exception { + Configuration config = super.loadResourceConfiguration(); + + boolean processIdUuid = Boolean.valueOf(config.getSimpleValue("process-id-uuid")); + if (processIdUuid) { + // Do not send the value of [process-id-socket-max-ports] as this should be 10 and could confuse the user + // when trying to change the value. + config.remove("process-id-socket-max-ports"); + } + + return config; + } + } diff --git a/modules/plugins/wfly-10/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/wfly-10/src/main/resources/META-INF/rhq-plugin.xml index 4b4fb870a6a..dda1b153b73 100644 --- a/modules/plugins/wfly-10/src/main/resources/META-INF/rhq-plugin.xml +++ b/modules/plugins/wfly-10/src/main/resources/META-INF/rhq-plugin.xml @@ -10141,12 +10141,10 @@ - - + - @@ -10254,12 +10252,10 @@ - - + -