I've got a JBoss-Application (accessing data in DB2 with the IBM JDBC-Drivers) and like to capture the SQLs. I've put the pdq.jar and pdqmgmt.jar into the JBoss-lib-directory and the pdq.properties into the JBoss-conf\props-directory. And in the system-properties.xml-file I put the also this line: .conf/props/pdq.properties
I restarted JBoss and the application, but no sqls were captured... I've tried several othe things, but until now, no sqls were captured.
Has anybody succeeded in trying to capture sqls from a JBoss-application? Is there a sample-configuration available (eg where to put the jar / properties file)?
This topic has been locked.
1 reply Latest Post - 2011-09-20T21:43:15Z by SystemAdmin
Pinned topic pureQuery & jBoss
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-09-20T21:43:15Z at 2011-09-20T21:43:15Z by SystemAdmin
SystemAdmin 110000D4XK90 PostsACCEPTED ANSWER
Re: pureQuery & jBoss2011-09-20T21:43:15Z in response to upupaHi Barbara,
I'm not an expert on JBoss, but can make some suggestions:
1) For PuerQuery captrue processing to work the pdq.jar and the db2jcc.jar (IBM jdbc driver) need to be loaded by the same classloader. You said:
I've put the pdq.jar and pdqmgmt.jar into the JBoss-lib-directory
Does the db2jcc.jar appear here too ?
2) You mentioned that you added pdq.properties to JBoss-conf\props-directory. Is that made part of the classpath automatically. If not, then pdq.properties will not be read as resource.
3) As you might have read, there are different ways to set the pureQuery properties. You are trying to use a global properties file. It will be better if you use DataSource properties instead of global properties.
As I understand, DataSources in JBoss are configured via xml configuration files. By default they have files for mySQL databases - these can be used as templates to create the configuration files for DB2 - I am assuming you have already done this because you say you are connecting to DB2.
So, in the configuration xml modify the URL to specify pdqProperties for example,
<connection-url>jdbc:db2://<server>:port/db:traceFile=C:/temp/jdbcTrace.txt;traceLevel=-1;pdqProperties=captureMode(ON), executionMode(DYNAMIC), pureQueryXml(C:/temp/capture/pdqxml);</connection-url>
The url syntax is: (:) colon after db and ;(semicolon) at the end - the tracing properties and pdqProperties are semicolon separated.
4) If you have some restriction in your environment on modifying datasource properties, and you are forced to go with global properties - check on the classpath suggestions above. If that does not help, please send a paste of the pdq.properties file contents. Perhaps they are specified incorrectly there.