P6Spy has been released as open source

Discussions

News: P6Spy has been released as open source

  1. P6Spy has been released as open source (11 messages)

    The Provision6 tool, P6spy, is now an open source project. The current release of P6Spy intercepts and logs the database statements of any application that uses JDBC. It is particularly useful for developers to monitor the SQL statements produced by EJB servers.

    Download the new release at: http://www.p6spy.com.
  2. This is great news. I have been using p6spy with WebLogic and Oracle for development. Works very well.

    Thanks Jeff.
  3. This sounds like a useful utility (would probably replace a quick-and-dirty one I'd written that was based on dynamic proxies) !

    However, the web-site in your message is currently down.

  4. It seems to me that site is running now, but however you could also find this project on sourceforge:

    http://sourceforge.net/projects/p6spy
  5. Rajeev Singh:

    Could you post your code?
    Sounds very interesting...
    "For every problem, there is a solution based on Dynamic Proxies"
  6. It works with WebLogic 5.1

    startWeblogic.sh:

     - add p6spy.jar in JAVA_CLASSPATH
     - Put spy.properties in JAVA_CLASSPATH

    weblogic.properties ( connection pool )

     - replace the JDBC class driver with com.p6spy.engine.spy.P6SpyDriver

    spy.properties
     - Modify the spy.properties and change the realdriver line with your JDBC class driver

    Richard
  7. Looks like a great tool.. But unfortunately i could
    not get it working(ie write to "spy.log".. )
    It is able to connect to the database with the
    spy driver..
  8. It seems that this does not work with Callablestatement..
    Otherwise it works great...
  9. Richard,

    Thanks for posting your WebLogic instructions. I have included them in the docs. Just to be complete, do you happen to know the default directory p6spy.log appears in when using WebLogic?

    Thanks,
    -Jeff
  10. weblogic home

    Richard
  11. Ricardo Arguello:

    Here's the source for my version of the utility.

    http://www.geocities.com/rajeevkumarsingh/src.jar

    Couple of points to note:

    a) It is quick and dirty.
    b) It should support CallableStatements
    c) If anyone's interested I have the Rational Rose model for the same.
    d) I was recently messing with it to make it work in a cluster (resolve log file clashes) but did not finish. It will very likely not work in a cluster.

    PS: I have a strong feeling p6spy also uses dynamic proxies.

     
  12. Zahid, check out the latest CVS revision. I've added CallableStatement support and I think it addresses your logging issue. If you don't want to check it out/build it drop me a line (jeff at p6spy dot com) and I will email you the latest jar.

    Rajeev, I like your solution! The P6Spy solution actually uses a true wrapper approach (combined with a generator). In the initial solutions we were building (not the logging solution) we were overriding a large number of method and we were very worried about performance, including some intense benchmarking. In retrospect, your dynamic proxy solution would have been a nice way to generate P6Spy.

    -Jeff