Daniel Perry wrote:

I've found p6spy very useful over the last couple of days. However, it took
a bit of encouragement to get it working!

I think the FAQ is a bit misleading.

Agreed.

It says:
"In the file build.properties you have to set the switch useP6Spy to true in
order to activate it:"

Which implies that you need to rebuild ojb to use it. On inspecting
build.xml it seems that this is only for the unit tests.  I think the FAQ
should be more along the lines of:

To add it to any project, you need to:
copy lib/p6spy.jar to your classpath.

copy spy.properties from src/test/org/apache/ojb/ to your classpath.

edit spy.properties, and:
    if not using hsqldb, comment it out
        #realdriver=org.hsqldb.jdbcDriver
    and uncomment the appropriate realdriver for your database.
    If you want it to log to a different file/path then edit:
        logfile     = spy.log
    If you want to log to stdout instead, then comment out the filelogger,
and uncomment stdoutlogger:
        appender=com.p6spy.engine.logging.appender.StdoutLogger
        #appender=com.p6spy.engine.logging.appender.FileLogger

p6spy is now installed, but to enable it, edit your repository_database.xml
and change your database driver to:
    driver="com.p6spy.engine.spy.P6SpyDriver"
If you want to disable it, just change your driver back to whatever you are
using eg:
driver="com.mysql.jdbc.Driver"
Note that you dont have to change any of the other properties eg, platform,
subprotocol, etc.

Hope that is of help to someone,

I will update the FAQ.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to