Configuring data source JDBC providers to use IBM Optim pureQuery Runtime in a Java SE environment

Use this task to configure the application data source Java Database Connectivity (JDBC) provider to use IBM Optim pureQuery Runtime to access DB2® in a Java Standard Edition (JSE) environment.

Before you begin

If you need to use multiple DB2 package collections, see the documentation about configuring IBM Optim pureQuery Runtime to use multiple package collections, before continuing with this task.

About this task

IBM Optim pureQuery Runtime makes use of DB2 packages. These packages consist of information for one or more Structured Query Language (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 Java archive (JAR) file. The DB2 bind command uses this file as input to create the DB2 package.
Important:
  • JPA sets the IBM Optim pureQuery Runtime property pdq.executionMode to the value STATIC.
  • The class path must include the install location for the IBM Optim pureQuery Runtime. For more information, see the documentation about installing IBM Optim pureQuery Runtime.
  • The JPA provider implementation must be JPA for the application server (com.ibm.websphere.persistence.PersistenceProviderImpl). The OpenJPA persistence provider does not provide support for IBM Optim pureQuery Runtime.
  • The wsdb2gen command requires the URL of a database. The wsdb2gen command forces a synchronize mapping function that creates or alters the required tables. For DB2 zOS, V8 unique indexes and LOB tables must be manually created prior to executing the wsdb2gen command.
IBM Optim pureQuery Runtime properties are specified in a pdq.properties file in the META-INF directory of the application JAR file. The pdq.ExecutionMode property is defaulted to STATIC for JPA applications. PDQ properties, if specified, pass on to the pureQuery runtime. See IBM Optim pureQuery Runtime documentation for list of properties and valid values.
  • wsjpa.jdbc.CollectionId : String value specifying the collection ID to use. This overrides any collection ID that is used during wsdb2gen.
Attention: Read more about the DB2 JAR level compliance for IBM Optim pureQuery Runtime at the IBM® Support Website: System requirements for IBM Optim pureQuery Runtime for Linux®, UNIX®, and Windows®.

Procedure

  1. Update the application data source JDBC provider configuration to include the IBM Optim 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 IBM Optim pureQuery Runtime. For more information, see the documentation about JDBC provider settings and installing IBM Optim pureQuery Runtime.
  2. Using the DB2 bind command provided by Data Studio, bind the XML file to the database. This creates the DB2 packages. For more information, see the documentation about the pureQuery Bind utility.

What to do next

If you want to reconfigure the data source for JDBC, remove the pdq.jar and pdqmgmt.jar from the class path.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Feb 5, 2014 9:49:51 PM CST
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-mp&topic=tejb_configpdqjpase
File name: tejb_configpdqjpase.html