When you set application-specific properties, modifying the properties and capturing SQL statements for one application do not disrupt the other applications that share a data source. You can also perform these actions on two or more of these applications at the same time without the actions on one application interfering with the actions on another, unless one or more of the applications depends on statement caching performed by the application server.
In fact, if you modify the properties that are specific to an application, you do not have to restart the application server that is running all of the applications. Instead, you can restart just the one application.
However, if you modify any properties that are in a pdq.properties file or that are set on a DataSource object, you must restart the application server. Properties that you might set in these locations are those that determine how pureQuery logs error messages. See How to set properties for capturing and running restricted sets of SQL statements dynamically for information about setting properties in these locations.
Suppose that two Web applications – Application1 and Application2 – are running under WebSphere® Application Server. You want to configure both to run SQL statements in pureQueryXML files dynamically.
Application1 uses 2 data sources: OrdersDS and ItemsDS. Application2 uses one of these data sources, too: OrdersDS.
The steps that follow show how to set up a simple configuration.
To set up and run Application1, you might follow these steps:
For pdq.ItemsDS.properties, you use these settings:
pdq.captureMode=ON pdq.pureQueryXml=App1Items.pdqxml
For pdq.OrdersDS.properties, you use these settings:
pdq.captureMode=ON pdq.pureQueryXml=App1Orders.pdqxmlThe names of the pureQueryXML files can follow any convention you like, as long as their extension is either .pdqxml or .xml.
To set up and run Application2, you might follow these steps:
pdq.captureMode=ON pdq.pureQueryXml=App2Orders.pdqxmlAgain, the name of the pureQueryXML file can follow your own convention. The extension, however, must be .pdqxml or .xml.