• 1 reply
  • Latest Post - ‏2011-09-20T21:43:15Z by SystemAdmin
1 Post

Pinned topic pureQuery & jBoss

‏2011-09-20T14:03:28Z |
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 into the JBoss-conf\props-directory. And in the system-properties.xml-file I put the also this line: .conf/props/

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)?

Updated on 2011-09-20T21:43:15Z at 2011-09-20T21:43:15Z by SystemAdmin
  • SystemAdmin
    90 Posts

    Re: pureQuery & jBoss

    Hi 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 to JBoss-conf\props-directory. Is that made part of the classpath automatically. If not, then 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 file contents. Perhaps they are specified incorrectly there.