+

Search Tips   |   Advanced Search

Set to use pureQuery in Java SE environment


Use this task to configure the application data source JDBC provider to use pureQuery to access DB2. to use multiple DB2 package collections, see the information center topic configure pureQuery to use multiple package collections before continuing with this task.

PureQuery makes use of 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 wsdb2gen command on a Java Persistence API (JPA) application to create the packages. The wsdb2gen command creates an XML file containing SQL statement information. This XML file must be included into the application JAR file. The DB2 bind command uses this file as input to create the DB2 package .

PureQuery properties are specified in a pdq.properties file in the META-INF directory of the application jar. The pdq.ExecutionMode property is defaulted to STATIC for JPA applications. PDQ properties, if specified, pass on to the pureQuery runtime. See Data Studio pureQuery runtime documentation for list of properties and valid values.

 

  1. Update the application data source JDBC provider configuration to include the pureQuery Runtime JAR files. Include the pdq.jar and pdqmgmt.jar files on the class path in addition to the JDBC driver jar files. Either define an new JDBC provider or modify an existing provider to include the JAR files. The class path must include the install location for the pureQuery Runtime. See the information center topics on JDBC provider settings and installing pureQuery Runtime for more information.

  2. Use the DB2 bind command provided by Data Studio, bind the XML file to the database. This creates the DB2 packages. Refer to the information center topic on the pureQuery Bind utility for more information.

 

Next steps

To reconfigure the data source for JDBC, remove the pdq.jar and pdqmgmt.jar from the class path.


Set pureQuery to use multiple package collections

 

Related tasks


Task overview: Data Studio pureQuery
Set a JDBC provider

 

Related


wsenhancer
wsdb2gen
JDBC provider settings
SQLj profiles and pureQuery bind files settings
Application management