DB2

Enabling retry for quick publish

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

  1. Update the wc-resource-containers.xml file.
    1. Open the WC_profiledir\installedApps\cell_name\WCServer_enterprise_archive\xml\content-management\wc-resource-containers.xml file for editing.
    2. 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.
  2. Update the wc-resource-containers.xsd file.
    1. Open the WC_profiledir\installedApps\cell_name\WCServer_enterprise_archive\xml\content-management\xsd\wc-resource-contairs.xsd file for editing.
    2. 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>