Executing the automation process requires configuring the Build.properties file and running the Apache Ant script.
In the previous tutorials of this series, you were introduced to the .properties file read by Ant scripts. This build.properties file is included in the downloadable ZIP source and is no different from the previous .properties files. However, this build.properties file has many properties because our automation process deals with almost all of the remaining pureQuery client optimization tasks. It contains the following properties:
- This is your JDK home directory.
- websphere.dir=C\:/Program Files/IBM/WebSphere
- This is the WebSphere home directory (only if WebSphere is on client machine).
- This is where the pdq.jar and pdqmgmt.jar, db2jcc.jar files, and pdq.properties files will be placed so WebSphere can access the files with the classpath. These files are required for client optimization (only if WebSphere is on client machine).
- websphere.webinf.dir=C\:/Program Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/IBM-L3D7044Node02Cell/Test_war.ear/Test.war/WEB-INF
- This is the directory where the application (WAR file) is installed. If you want to modify your application, you can modify the application without reinstalling the application through the admin console. You can stop the web server, copy over the .jar files or .class files, and restart the server (only if WebSphere is on client machine).
- This is the WebSphere host URL and port.
The properties below are used by the ManageRepository utility to connect to the repository.
- This URL points the client optimization external database repository.
- This is the user name to connect to the repository.
- This is the password to connect to the repository.
- This loads the IBM JCC driver to be used by the application.
- This sets up the repository type for the application.
- These folders specify the home directory and folders where the upload, extraction, captured, and HTTP files will reside.
The following properties specify the runtimeGroup variables
- This variable specifies the runtime group created for the application that uses the repository.
- The above two variables specifies the version and contact for the repository.
- This property specifies the base name of capture files created by client optimization during incremental capture. Hence, capture files will be named as IncrementalCapture_XXX.
- The above list specifies the number of executions for the extract, merge, configure, bind, and update process. At this time, due to the limitations of Apache Ant, you need to specify a list and not a number, such as N.
- The above time specifies the intervals between each extraction process.
- This URL will launch the application. It will be loaded by the build.xml to launch the application within our automated Ant process.
Once the build.properties file has been configured, all you have to do is launch the build.xml script. Setting up Apache Ant and running an Ant script was shown in Part 1. The downloadable archive includes the repository.xml and build.xml files. You will run the build.xml, which calls the repository.xml.
During execution, the web application will run while the extract, merge, configure, bind, and update client optimization tasks occur simultaneously at regular intervals. Details about this process will be discussed in the next section.
Launching the build.xml can be done from the command line or inside an Optim Development Studio- or Eclipse-based environment (this was also shown in previous sections).
Figure 22. Running Ant