Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
I have following questions on using P6Spy for logging SQL (along with the values passed in the prepared statement) using iBatis in JDK 1.5.
1. Has anybody used P6Spy in WebSphere 6.1 (JDK 1.5)? Documentation suggests support for WebSphere 4.
2. Does P6Spy require you to use its own database driver, and replace the standard database driver (DB2Java.zip for DB2, in my case) with P6Spy driver instead? If so, I will require to replace my DB2Java.zip (DB2 driver) with P6Spy.jar instead. Is that true?
3. Is there any other alternative for logging SQL (along with its values) in JDK 1.5 using iBatis? For example, I want to see SQL like:
select co1 from table1 where is=11 -- I want to see the value of 11, along with SQL.
I was thinking that P6Spy would solve it. However, if I am required to use P6Spy driver (and cannot use DB2 driver), I may be hesitant to using P6Spy option.
I modified p6spy to work under WAS 6.1, and also to provide additional functionality,
including showing bind values, result set value, detecting cursor and connection leaks, etc.
You specify the p6spy provider on the datasource, but identify the real jdbc provider to p6spy.
So, p6spy acts as a proxy driver (as it should).
Actually, so far, I have only tested with Oracle, but DB2 "shouldn't" be that hard to implement.
I quote that because it is somewhat tricky, what with XA support and all.
It has been about 6-9 months since I worked on this, but I wrote lots of documentation, and offered to upload it to sourceforge;
it appears that the project owner(s) have abandoned the project.
Let me know if you want it and I can send you a zip file containing the entire source (including my mods) and the doc.
I can't promise that I will invest a lot of time supporting you, but I will try to help as much as I am able.
I did try to use WAS SQL tracing capabilities, and couldn't get it to work properly.
I also tried to use Oracle's SQL tracing, but it does not show bind variables.
Let me know if you want this stuff.
P.S. I am not familiar with iBatis
It will be of great help if you would please share your documentation and zip files for running P6Spy in WebSphere 6.1.
I would like to further clarify again the following point.
In order to use P6Spy, do I need to replace the original database driver (e.g. Db2Java.zip) with the P6Spy driver?
I tried a lot to configure p6spy in WAS6.1.but i couldn't.can you send me the files what you changed?
have you changed spy.properties to work in oracle.
have you changed any p6spy related class files so that it can work in WAS6.1.
Please mail me to firstname.lastname@example.org.
Yes. You must define the datasource to use the appropriate class in p6spy, and then configure p6spy to use the appropriate "real" jdbc driver.
I sent you my documentation and soruce code, as you requested....
Thanks for sending.it worked for WAS 6.1 like a gem.
Hi Ralph --
Can you send me patch for documentation/ code for this issue?
Hi there -
Sorry for the late response. I think I am the only one who has recently done anything with p6spy. I got some basic access to this project from the only original developer I could reach. Unfortunately, not full project admin access. So I have moved over to github for further development.
You are welcome to help out there by forking and then sending me a pull request.
Further development at : https://github.com/patmoore/p6spy