Running pureQuery Runtime configuration and verification scripts for WebSphere Application Server

The pureQuery™ installation directory contains scripts that configure WebSphere® Application Server to run pureQuery enabled applications. The directory also contains a WebSphere servlet application that verifies that the WebSphere Application Server is configured correctly.

Before you begin

The user who is running the scripts must have the following privileges:

About this task

The scripts are in the PureQuery_Websphere_Config_Scripts directory of the pureQuery Runtime installation directory.

You can run the scripts without specifying parameters to display the required and optional parameters for the script.

Procedure

To run scripts to configure WebSphere Application Server to work with pureQuery Runtime and to verify the configuration, run the scripts in this order:

  1. Run the InstallPQJars script to update a JDBC provider class path with pureQuery Runtime information.
  2. Run the SetupDSProp script to create a custom data source property that specifies pureQuery Runtime properties.
  3. Run the InstallPQValidator script to verify the pureQuery Runtime configuration.

Running the InstallPQJars script to add pureQuery Runtime JAR files to a JDBC provider class path

When you run the InstallPQJars script, you specify the scope of the WebSphere JDBC provider to update and the path to the pureQuery Runtime JAR files. You select the JDBC provider from a list of providers that the script displays. The script updates the class path of the JDBC provider that you specify. After the script configures the provider class path, it displays information about the WebSphere JDBC provider, pureQuery Runtime, and the Java environment.

Procedure

To run the script to add pureQuery Runtime JAR files to a JDBC provider class path:

  1. Open a command window and run InstallPQJars script. For example, this command specifies that the WebSphere node devNode01 and the path to the pureQuery Runtime JAR files is C:/PureQueryRuntime. :
     InstallPQJars -node devNode01 -pqPath C:/PureQueryRuntime

    The example command assumes that the WebSphere JDBC providers are defined at the node level and that the WebSphere Application Server installation is a simple, stand-alone installation.

  2. Follow the script instructions to configure the JDBC provider class path.

    If the script detects the pureQuery Runtime JAR files in the class path, you can choose to update the class path or keep the current class path.

    When the script completes, it displays WebSphere, pureQuery, and Java configuration information.

What to do next

From the administrative console, you can view the updated JDBC provider class path with the pureQuery Runtime information.

Next, run the script SetupDSProp to configure a JDBC provider data source with pureQuery Runtime properties.

Running the SetupDSProp script to add pureQuery Runtime properties to a data source

When you run the SetupDSProp script, you specify pureQuery Runtime property values and a WebSphere server. The SetupDSProp script creates the custom property pdqProperties for the specified data source. The value of the property is the list of specified pureQuery Runtime property values.

Procedure

To run the script to configure a data source:

  1. Open a command window and run the SetupDSProp script. For example, this command specifies the WebSphere server server1 and specifies the value of the pureQuery Runtime property captureMode as ON, and the value of the property pureQueryXml as C:\temp\capture.pdqxml.
    SetupDSProp -server server1 -props "captureMode(ON), pureQueryXml(C:\temp\capture.pdqxml)"
    Note: The script does not validate the pureQuery Runtime property values that you specify. It creates the custom property pdqProperties with the string as the property value.
  2. Follow the script instructions to configure the data source.

    After you select the data source to configure, the script creates the custom property. Then, the script displays information about the data source and the custom property.

Results

From the administrative console, you can verify that the pdqProperties custom property is set. The property is listed as a custom property for the data source.

What to do next

Next, run the script InstallPQValidator to verify that the pureQuery Runtime configuration is correct by running the InstallPQValidator script.

Running the InstallPQValidator script to verify the pureQuery Runtime configuration

The InstallPQValidator script installs and starts the WebSphere servlet RunPQDataVersionEAR.ear. The servlet validates the pureQuery configuration and the pureQuery Runtime prerequisites for the data source. The servlet displays the context, application class loaders, global pureQuery properties, and pureQuery Runtime version information.

Procedure

To run the script to verify pureQuery Runtime installation:

  1. Open a command window and run the InstallPQValidator script. For example, this command specifies the WebSphere server server1, node devNode01.
    InstallPQValidator -server server1 -node devNode01
    The script installs and the starts the servlet

    The servlet is listed as an application in the administrative console.

  2. Run the servlet from a browser. Start a browser and enter the URL to run the servlet.
    For example, this URL assumes that WebSphere is running, that the servlet is on your compute, and that the WebSphere Application Server port is 9081:
    http://localhost:9081/RunPQValidate/
    The servlet page opens.
  3. On the servlet page, enter the JNDI name for the DB2® data source and click Submit.

    The servlet makes a connection with the data source and then displays configuration information in the browser window.

What to do next

The WebSphere Application Server data source is configured for pureQuery Runtime. pureQuery enabled applications can use the data source to access a DB2 database.

Feedback