com.ibm.pdq.runtime.datasource
Interface EnhancedDataSource

All Known Implementing Classes:
EnhancedConnectionPoolDataSourceForOracle, EnhancedDataSourceForOracle, EnhancedDataSourceForOracle, EnhancedXADataSourceForOracle

public interface EnhancedDataSource

Implemented by pureQuery data sources. This interface provides methods that enable and control pureQuery functionality.


Method Summary

Method Summary
Return Data TypeMethod Name and Description
String getPdqProperties()
Returns the string of pureQuery properties that was set by using the method setPdqProperties(String pdqProperties).
void setPdqProperties(String pdqProperties)
Sets the pureQuery properties for this data source.

Method Detail

getPdqProperties

String getPdqProperties()
Returns the string of pureQuery properties that was set by using the method setPdqProperties(String pdqProperties). If setPdqProperties(String pdqProperties) is not invoked, returns null.
Returns:
the string of pureQuery properties that was set by using the method setPdqProperties(String pdqProperties). Returns null if setPdqProperties(String pdqProperties) is not invoked.
See Also:
getPdqProperties()

setPdqProperties

void setPdqProperties(String pdqProperties)
Sets the pureQuery properties for this data source. The pureQuery properties control the pureQuery functionality of the data source.

pdqProperties must be a string of the pureQuery properties. The string must be in this format:
property1Key(property1Value),property2Key(property2Value),property3Key(property3Value)...
Each property must be listed as the property name, followed by the value in parentheses. Properties must be separated by commas.

The following properties are supported:

This example properties string directs pureQuery to capture SQL that is executed by connections that are created by the data source. The SQL is captured in the capture file C:\directory\captureFile.pdqxml:
captureMode(ON),pureQueryXml(C:\directory\captureFile.pdqxml)

pureQuery properties can also be specified in a properties file. For each property, pureQuery looks in the following places in the order listed. pureQuery uses the first value that it finds.

  1. A file named pdq.appwide.properties in the classpath of the application
  2. A file named pdq.dataSourceName.properties in the classpath of the application
  3. The string of properties specified to setPdqProperties(String pdqProperties)
  4. A file named pdq.properties in the classpath that is used to load pdq.jar
Parameters:
pdqProperties - A string that contains the pureQuery properties to set for this data source. Each property must be listed as the property name, followed by the value in parentheses. Properties must separated by commas.