Configure P6Spy with JBoss-4.2.1.GA

P6Spy is a very good tool to trouble shoot application and database problem. It put all queries from application to spy.log file, here are steps to configure it in JBoss-4.2.1.GA pointing to EDB:

  1. Download P6Spy
  2. Extract the p6spy-install.jar file, it contains p6spy.jar and spy.properties
  3. Put p6spy.jar to you server lib folder, I put it in $JBOSS_HOME/server/myserver/lib
  4. Move the spy.properties file to the JBoss classpath, I put it in $JBOSS_HOME/bin
  5. Cange the xxx_ds.xml in the $JBOSS_HOME/server/myserver/deploy folder to use P6SpyDriver, <driver-class>com.p6spy.engine.spy.P6SpyDriver</driver-class>
  6. Change spy.properties file to use correct database driver, I am using EDB: realdriver=com.edb.Driver
  7. Look at queries in spy.log file, normally located at the same directory as spy.properties file

~ by yingliang on August 28, 2009.

2 Responses to “Configure P6Spy with JBoss-4.2.1.GA”

  1. Hi -

    Thanks for check out and using P6spy. I am in the process of upgrading P6spy. You should check out the latest version from the svn core repo and try that out and help improve P6spy for a new release.

  2. Would that work with Oracle XA DataSource too.
    Can you please try it out
    I have the following -ds.xml file

    jdbc/siperian-localhost-vorcl-sip_sample-ds
    true
    false
    oracle.jdbc.xa.client.OracleXADataSource
    jdbc:oracle:thin:@localhost:1521:vorcl
    sip_sample
    sipSample
    5
    5
    org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter

    Oracle9i

Leave a Reply




*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image