If quick publish fails because of a DB2 deadlock timeout error, the files and
data changes do not get published. You can enable quick publish retry to automatically
force quick publish to try again if a deadlock timeout exception is
encountered.
About this task
When you enable quick publish for a task group, the changed files and data within the task
group are published to production when all tasks are marked complete and all approvals are
satisfied. However, if quick publish fails because of a DB2 deadlock timeout error, the file and
data changes do not get published. You can enable quick publish retry to automatically
force quick publish to try again when a deadlock timeout exception is encountered.
Procedure
-
Change the configuration files below before building the application package with the WebSphere
Commerce Build tool. For more information, see Building a custom Docker image from a deployable package.
-
Update the wc-resource-containers.xml file.
- Open the
WC_eardir\xml\content-management\wc-resource-containers.xml
file for editing.
- In the wc-resource-containers.xml file, locate the
<wc:QuickPublishConfiguration>
element, and add the retry
and
waitTime
parameters as shown:
<wc:QuickPublishConfiguration>
<wc:Publisher
className="com.ibm.commerce.context.content.resources.publish.DefaultJDBCContentPublisherImpl"
initParameters="batchSize=0" retry="5" waitTime="60"/>
</wc:QuickPublishConfiguration>
Note: batchSize
refers to JDBC batch.
-
Update the wc-resource-containers.xsd file.
- Open the
WC_eardir\xml\content-management\xsd\wc-resource-contairs.xsd
file for editing.
- In the wc-resource-containers.xsd file, locate the
Publisher
element, and add the retry
and waitTime
attributes as shown:
<element name="Publisher">
<complexType>
<attribute name="className" type="string" use="required"/>
<attribute name="initParameters" type="string" use="optional"/>
<attribute name="retry" type="int" use="optional" form="unqualified">
<annotation>
<documentation>Specify the number of times the content publisher should attempt the transaction again when it encounters a transaction rollback.</documentation>
</annotation>
</attribute>
<attribute name="waitTime" type="int" use="optional" form="unqualified">
<annotation>
<documentation>Specify the number of seconds the content publisher should wait between retry attempts.</documentation>
</annotation>
</attribute>
</complexType>
</element>