Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #230 from josejulio/bugs/1320260
Browse files Browse the repository at this point in the history
Bug 1320260 - Unknown attribute when trying to edit Transactions Subs…
  • Loading branch information
burmanm committed Mar 30, 2016
2 parents f30292a + 91ace13 commit e8d1014
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
Expand Up @@ -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
*
*
Expand All @@ -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;
}

}
Expand Up @@ -10141,12 +10141,10 @@
<metric property="number-of-resource-rollbacks" description="The number of transactions that rolled back due to resource (participant) failure." measurementType="trendsup" defaultInterval="300000" defaultOn="true"/>

<resource-configuration>
<c:simple-property name="relative-to" required="false" type="string" readOnly="false" defaultValue="jboss.server.data.dir" description="References a global path configuration in the domain model, defaulting to the JBoss Application Server data directory (jboss.server.data.dir). The value of the 'path' attribute will treated as relative to this path. Use an empty string to disable the default behavior and force the value of the 'path' attribute to be treated as an absolute path. The default value is jboss.server.data.dir."/>
<c:simple-property name="process-id-uuid" required="false" type="boolean" readOnly="false" description="Indicates whether the transaction manager should use a UUID based process id."/>
<c:simple-property name="socket-binding" required="false" type="string" readOnly="false" description="Used to reference the correct socket binding to use for the recovery environment."/>
<c:simple-property name="socket-binding" required="true" type="string" readOnly="false" description="Used to reference the correct socket binding to use for the recovery environment."/>
<c:simple-property name="jts" required="false" type="boolean" readOnly="false" defaultValue="false" description="If true this enables the Java Transaction Service. The default value is false."/>
<c:simple-property name="object-store-path" required="false" type="string" readOnly="false" defaultValue="tx-object-store" description="Denotes a relative or absolute filesystem path denoting where the transaction manager object store should store data. By default the value is treated as relative to the path denoted by the 'relative-to' attribute. The default value is tx-object-store."/>
<c:simple-property name="path" required="false" type="string" readOnly="false" defaultValue="var" description="Denotes a relative or absolute filesystem path denoting where the transaction manager core should store data. By default the value is treated as relative to the path denoted by the 'relative-to' attribute. The default value is var."/>
<c:simple-property name="process-id-socket-binding" required="false" type="string" readOnly="false" description="The name of the socket binding configuration to use if the transaction manager should use a socket-based process id. Will be 'undefined' if 'process-id-uuid' is 'true'; otherwise must be set."/>
<c:simple-property name="default-timeout" required="false" type="integer" readOnly="false" defaultValue="300" description="The default timeout. The default value is 300."/>
<c:simple-property name="process-id-socket-max-ports" required="false" type="integer" readOnly="false" defaultValue="10" description="The maximum number of ports to search for an open port if the transaction manager should use a socket-based process id. If the port specified by the socket binding referenced in 'process-id-socket-binding' is occupied, the next higher port will be tried until an open port is found or the number of ports specified by this attribute have been tried. Will be 'undefined' if 'process-id-uuid' is 'true'. The default value is 10."/>
Expand Down Expand Up @@ -10254,12 +10252,10 @@
</plugin-configuration>

<resource-configuration>
<c:simple-property name="relative-to" required="false" type="string" readOnly="false" defaultValue="jboss.server.data.dir" description="References a global path configuration in the domain model, defaulting to the JBoss Application Server data directory (jboss.server.data.dir). The value of the 'path' attribute will treated as relative to this path. Use an empty string to disable the default behavior and force the value of the 'path' attribute to be treated as an absolute path. The default value is jboss.server.data.dir."/>
<c:simple-property name="process-id-uuid" required="false" type="boolean" readOnly="false" description="Indicates whether the transaction manager should use a UUID based process id."/>
<c:simple-property name="socket-binding" required="false" type="string" readOnly="false" description="Used to reference the correct socket binding to use for the recovery environment."/>
<c:simple-property name="socket-binding" required="true" type="string" readOnly="false" description="Used to reference the correct socket binding to use for the recovery environment."/>
<c:simple-property name="jts" required="false" type="boolean" readOnly="false" defaultValue="false" description="If true this enables the Java Transaction Service. The default value is false."/>
<c:simple-property name="object-store-path" required="false" type="string" readOnly="false" defaultValue="tx-object-store" description="Denotes a relative or absolute filesystem path denoting where the transaction manager object store should store data. By default the value is treated as relative to the path denoted by the 'relative-to' attribute. The default value is tx-object-store."/>
<c:simple-property name="path" required="false" type="string" readOnly="false" defaultValue="var" description="Denotes a relative or absolute filesystem path denoting where the transaction manager core should store data. By default the value is treated as relative to the path denoted by the 'relative-to' attribute. The default value is var."/>
<c:simple-property name="process-id-socket-binding" required="false" type="string" readOnly="false" description="The name of the socket binding configuration to use if the transaction manager should use a socket-based process id. Will be 'undefined' if 'process-id-uuid' is 'true'; otherwise must be set."/>
<c:simple-property name="default-timeout" required="false" type="integer" readOnly="false" defaultValue="300" description="The default timeout. The default value is 300."/>
<c:simple-property name="process-id-socket-max-ports" required="false" type="integer" readOnly="false" defaultValue="10" description="The maximum number of ports to search for an open port if the transaction manager should use a socket-based process id. If the port specified by the socket binding referenced in 'process-id-socket-binding' is occupied, the next higher port will be tried until an open port is found or the number of ports specified by this attribute have been tried. Will be 'undefined' if 'process-id-uuid' is 'true'. The default value is 10."/>
Expand Down

0 comments on commit e8d1014

Please sign in to comment.