You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Phil Warrick <ph...@mcgill.ca> on 2003/03/30 23:31:30 UTC

[jBoss] p6spy settings for OJB

Hi all,

A solution rather than a question for a change.

I had been able to get p6spy to run fine with OJB standalone and as 
usual, moving p6spy logging to a jBoss environment was not completely 
obvious.  The instructions on the p6spy site were helpful but still left 
out some crucial details.
(http://www.p6spy.com/documentation/install.htm#jboss3)

What it comes down to is this:

Assuming you have a working JCA connection to your db using a
JBOSS_HOME\server\default\deploy\xxx-service.xml file, where xxx is your 
db,

1) simply make a copy of this file
2) rename if you want to p6spy-service.xml
3) replace the DriverClass setting to the p6spy driver:
<config-property name="DriverClass" 
type="java.lang.String">com.p6spy.engine.spy.P6SpyDriver</config-property>
4) remove the original xxx-service.xml so that there is not a conflict 
with your xxxDS JCA name
5) put the spy.properties file on the classpath: you may need to create 
a directory like
JBOSS_HOME\server\default\db\p6spy
and then modify JBOSS_HOME\bin\run.bat or .sh to include this directory 
on the classpath
6) spy.log will by dumped to the JBOSS_HOME\bin directory

hth,

Phil