Configuring JDBC providers to use pureQuery to access DB2
Use this task to configure the application data source Java™ Database Connectivity (JDBC) provider to use pureQuery to access DB2® in a Java EE environment.
Before you begin
About this task
PureQuery uses DB2 packages.
These packages consist of information for one or more SQL statements
and are stored in the DB2 catalog.
You must first run the wsdbgen command on a JPA
application to create the packages. The wsdbgen command
creates an XML file containing SQL statement information. This XML
file must be included into the application Java archive (JAR) file. The DB2 bind command uses this file as input to create
the DB2 package .
Important:
- JPA sets the pureQuery property pdq.executionMode to the value STATIC.
- The JDBC provider configuration must include the JAR file for the pureQuery runtime environment. This JAR file is in addition to the JDBC driver JAR file. See the information center topic on installing pureQuery run time for more information.
- If this is an XA data source, define a new custom property on the data source where property_name = downgradeHoldCursorsUnderXa and boolean value = true.