Wednesday, May 26, 2004

Debugging Tip #2 - P6Spy - A mini review...

Following the excellent comment I got earlier today to my last entry, I took a look at P6Spy - a tool for capturing jdbc information within your application... Looks solid and mature...

For those interested about how it works, it's a proxy pattern - it wrappers your (real) jdbc driver ... so when I call DriverManager.getConnection() it's calling P6Spy's getConnection (which in turn proxies this off to the real driver...) ... all of the sql classes are proxied (ResultSet, etc... ) allowing it to capture as much data as your little heart would desire...

Only caveat was that it didn't work with jdk 1.1.8 ... In fact I'm not sure if it works with anything less than 1.4.x ... but given that it needs to implement / wrapper all of the objects, and given changes in javax.sql.* set of classes as java has evolved you'd need an implementation of P6Spy for each major version (that you cared to support...) so... it's not unexpected that it requires 1.4.x ... Running the new Enterprise version of Fast BugTrack with 1.4.X JVM got everything working fine... Would be nice if they mentioned the required JVM's in the install / troubleshooting section of their docs - but I'm not complaining ;)

Just a note that using tools like these are handy not just for debugging your application, but can also help you identify inefficient SQL or potential bottlenecks that will allow you to optimize your application... The P6Spy log file was (obviously) much easier to read than raw packet data... easy to sort / filter / etc...

4 Comments:

Blogger tweedledeetweedledum said...

This blog is awesome! If you get a chance you may want to visit this construction estimating software site, it's pretty awesome too!

October 01, 2005 9:56 AM  
Blogger TS said...

Nice Blog!!!   I thought I'd tell you about a site that will let give you places where
you can make extra cash! I made over $800 last month. Not bad for not doing much. Just put in your
zip code and up will pop up a list of places that are available. I live in a small area and found quite
a few. MAKE MONEY NOW

October 02, 2005 1:21 AM  
Blogger Marketing man said...

Hello, My name is Donald you have a great blog here! I'm definitely going to bookmark you! I have a work at home assembling
site. It pretty much covers work at home assembling
related stuff.

Come and check it out if you get time :-)

October 02, 2005 2:14 AM  
Blogger Milf Cruise said...

mature milf MILF

October 02, 2005 6:36 PM  

Post a Comment

<< Home