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.
- Posted by: Jeff Goke
- Posted on: April 07 2002 18:43 EDT
Download the new release at: http://www.p6spy.com.
- P6Spy has been released as open source by Thomas Risberg on April 08 2002 18:56 EDT
- P6Spy has been released as open source by Rajeev Singh on April 08 2002 20:55 EDT
- P6Spy has been released as open source by Dejan Bosanac on April 09 2002 03:52 EDT
- P6Spy has been released as open source by Ricardo Arguello on April 09 2002 16:56 EDT
P6Spy has been released as open source by Richard Delbet on April 10 2002 09:43 EDT
- P6Spy has been released as open source by Zahid Shaikh on April 10 2002 02:03 EDT
- P6Spy has been released as open source by Jeff Goke on April 11 2002 12:56 EDT
- P6Spy has been released as open source by Rajeev Singh on April 10 2002 08:04 EDT
- P6Spy has been released as open source by Richard Delbet on April 10 2002 09:43 EDT
This is great news. I have been using p6spy with WebLogic and Oracle for development. Works very well.
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.
It seems to me that site is running now, but however you could also find this project on sourceforge:
Could you post your code?
Sounds very interesting...
"For every problem, there is a solution based on Dynamic Proxies"
It works with WebLogic 5.1
- 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
- Modify the spy.properties and change the realdriver line with your JDBC class driver
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
It seems that this does not work with Callablestatement..
Otherwise it works great...
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?
Here's the source for my version of the utility.
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.
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.