DataCapture policy

The DataCapture policy is defined on the integration node, and controls settings that are used for business transaction monitoring such as the data store to be used for recording business transactions.

A default DataCapture policy provides values for some of the business transaction properties, such as the database location where the business data is stored. You set the database location by specifying the data source name in the Configure tab of the business transaction monitor when you create the business transaction definition, and the default DataCapture policy is updated with the new data source name as a result. It is not necessary to make any other changes to the default DataCapture policy; however, if you want to change any other properties in the policy, you can modify it by following the instructions in Updating the default DataCapture policy.

You can use the following tools to retrieve and update the DataCapture policy:
Representational State Transfer (REST) application programming interface (API)
Use the REST API to retrieve and update DataCapture policy documents in the Integration Registry. For more information, see Representational State Transfer (REST) API.
Command line
Use the following commands to retrieve and update DataCapture policy documents:
The following example shows an annotated default DataCapture policy document:
<?xml version="1.0"?>
<policy type="DataCapture">
  <policyProperties>
    <description>
      <shortDescription>Default data capture policy</shortDescription>
    </description>
    <configurations>
      <configuration name="default">
	   <!-- The ODBC data source to record business transaction results to. An ODBC data source must
             be provided in order to record business transaction results. The default value of this
             element is the empty string. -->
        <dataSourceName>BTMDB</dataSourceName>
	   <!-- The database schema to use when accessing business transaction result tables in the database.
             Optional - can be left blank to use the default schema for the database user. The default
             value of this element is the empty string. -->
        <schema>BTMSCHEMA</schema>
        <!-- The IBM MQ queue on the queue manager specified on the integration node, to use for backing out
             invalid monitoring event messages that cannot be processed by the business transaction recorder. The
             default value of this element is the SYSTEM.BROKER.DC.BACKOUT queue, which is created by the sample
             MQSC scripts provided with IBM Integration Bus. -->
        <backoutQueue>SYSTEM.BROKER.DC.BACKOUT</backoutQueue>
	   <!-- The number of monitoring event messages to process before committing both the IBM MQ transaction
             and the database transaction. The default value of this element is 1 monitoring event message. -->
        <commitCount>1</commitCount>
	   <!-- The maximum amount of time (in seconds) that is allowed in between commits for both IBM MQ and the database.
             The default value of this element is 3 seconds. -->
        <commitIntervalSecs>3</commitIntervalSecs>
	   <!-- The IBM MQ queue on the queue manager specified on the integration node, which will be used for subscribing to
             monitoring event messages. The business transaction recorder will set up one or more unmanaged subscriptions
             that puts the monitoring event messages to this queue. The business transaction recorder then
             gets the messages from this queue. The default value of this element is the SYSTEM.BROKER.DC.RECORD
             queue, which is created by the sample MQSC scripts provided with IBM Integration Bus. -->
        <queueName>SYSTEM.BROKER.DC.RECORD</queueName>
        <!-- The number of threads to use in the business transaction recorder for processing monitoring event
             messages, recording them to the database, and correlating them into business transaction results.
             The default value of this element is 10 threads. If the value of threadPoolSize is greater than 1, 
             the value that will be used for commitCount will always be 1, irrespective of whether you have set 
             a value for commitCount that is greater than 1. If you want to use a commitCount value that is 
             greater than 1, you must set the value of threadPoolSize to 1. -->
        <threadPoolSize>10</threadPoolSize>
	    <!-- Specify whether or not to use globally coordinated (XA) transactions for both IBM MQ and the database.
              The default value of this element is false, which means do not use globally coordinated (XA) transactions. -->
        <useCoordinatedTransaction>false</useCoordinatedTransaction>
      </configuration>
    </configurations>
    <businessTransactionMonitoring>
      <btd uri="*" configuration="default">
        <recordingServer/>
        <viewingServer/>
      </btd>
    </businessTransactionMonitoring>
  </policyProperties>
</policy>
If you want to use a specific integration server for recording or viewing business transaction data, you can specify it by using the recordingServer and viewingServer properties, as shown in the following example:
<businessTransactionMonitoring>
      <btd uri="*" configuration="default">
        <!-- Specify which integration server to use for recording business transaction results. An empty
             value is allowed, which means that any integration server can be used for recording business
             transaction results. The default value of this element is the empty string. -->
        <recordingServer>IS.BTM.RECORDING</recordingServer>
        <!-- Specify which integration server to use for viewing business transaction results. An empty
             value is allowed, which means that any integration server can be used for viewing business
             transaction results. The default value of this element is the empty string. -->
        <viewingServer>IS.BTM.VIEWING</viewingServer>
      </btd>
    </businessTransactionMonitoring>