Question & Answer
Question
Failing command is retried multiple times *|* -D8E27796319539688525754A006CB362- *|*
Answer
Technote (troubleshooting)
Problem(Abstract)
A controller command that does not have the retriable property set to true in the CMDREG and that does not override the isRetriable default of false gets retried after the command fails.
Symptom
A controller command that is not expected to be retried on failure gets retried on failure.
Resolving the problem
By default a ControllerCommand has a value of false for isRetriable(). However this does not mean that the command will not be re-run if it fails.
The method isRetriable() returns the retriable property for a controller command. This retriable property is initialized by the command factory based on the properties defined in the command configuration. This command configuration at runtime can come from the following two locations in the following sequence:
1) If the retriable properties in the PROPERTIES column of the CMDREG table exists in the database the command factory uses this setting as the retriable configuration otherwise
2) If an instance property called <CommandRegistryRetriableProperty defaultValue="0" (or "false") /> is defined in the wc-server.xml file then the command factory uses this setting as the default retriable configuration
3) Otherwise the retriable properties defined in the ControllerCommand will be used.
In the preceding list 1 is the highest priority and 3 is the lowest. The default value for the ControllerCommand is false but the default value for the CommandFactory functionality is actually true which overrides the value from the ControllerCommand. Therefore unless there is an entry in the CMDREG.PROPERTIES column that indicates that the command is not retriable the command will always have a value of true for retriability.
If you wish your controller command to be explicitly not retriable then you need to give it a property value of retriable=0 in the CMDREG.PROPERTY entry for the command.
Was this topic helpful?
Document Information
Modified date:
13 October 2021
UID
ibm10770675