Network Deployment (Distributed operating systems), v8.0 > Administer applications and their environment > Administer EJB applications > Administer applications that use the Java Persistence API > Configure JPA to work in the environment > Task overview: IBM Optim pureQuery Runtime


Configure JDBC providers to use pureQuery to access DB2

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

PureQuery uses DB2 packages. These packages consist of information for one or more SQL statements and are stored in the DB2 catalog. We 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 JAR file. The DB2 bind command uses this file as input to create the DB2 package .


Procedure

  1. Update the application data source JDBC provider configuration to include the pureQuery runtime JAR file. Either define a new JDBC provider or modify an existing provider to include the following JAR files. See information center topics on JDBC provider settings and installing IBM Optim pureQuery Run time for more information.

    • pdq.jar
    • pdqmgmt.jar

  2. Use the DB2 bind command, bind the XML file to the database. This creates the DB2 packages. There are three ways to do this:

    • Use the wsadmin command. Refer to the information center topic on application management command group for more information.

    • Use the administrative console. Refer to the information center topic on SQLj profiles and pureQuery bind files settings for more information.

    • Use the DB2 bind command provided by IBM Optim pureQuery Run time. Refer to the information center topic on the pureQuery Bind utility for more information.


What to do next

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


Related


Configure pureQuery to use multiple DB2 package collections
Task overview: IBM Optim pureQuery Runtime
Configure a JDBC provider


Related


wsenhancer command
wsdbgen command
JDBC provider settings
SQLJ profiles and pureQuery bind files settings
Application management command group

+

Search Tips   |   Advanced Search