Snooping

This is a discussion on Snooping within the JDBC JAVA forums in Framework and Interface Programming category; Is there an official way to snoop on what the app and database say to each other? Just what does PreparedStatement send? Just what does a raw resultset coming back look like? -- Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching....

Go Back   Application Development Forum > Framework and Interface Programming > JDBC JAVA

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 01-16-2006, 11:05 PM
Roedy Green
Guest
 
Default Snooping

Is there an official way to snoop on what the app and database say to
each other? Just what does PreparedStatement send? Just what does a
raw resultset coming back look like?
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Reply With Quote
  #2  
Old 01-17-2006, 01:38 AM
Tony Morris
Guest
 
Default Re: Snooping


"Roedy Green" <my_email_is_posted_on_my_website@munged.invalid > wrote in
message news:76ros118apt14q85bsonm9cvrrp8pdu4kb@4ax.com...
> Is there an official way to snoop on what the app and database say to
> each other? Just what does PreparedStatement send? Just what does a
> raw resultset coming back look like?
> --
> Canadian Mind Products, Roedy Green.
> http://mindprod.com Java custom programming, consulting and coaching.


That depends on the driver.
As far as 'snooping' on what the driver is doing, I have written a driver
that accepts an underlying driver and a callback on the URL that performs
delegation and calls back when sending/receiving data. I will try to find it
if you like but I have a feeling that it is property of my employer.

--
Tony Morris
http://tmorris.net/


Reply With Quote
  #3  
Old 01-17-2006, 04:38 AM
Thomas Hawtin
Guest
 
Default Re: Snooping

Roedy Green wrote:
> Is there an official way to snoop on what the app and database say to
> each other? Just what does PreparedStatement send? Just what does a
> raw resultset coming back look like?


At a TCP/IP level, directing through a straightforward dumping proxy
should work. Assuming the driver is just using a a simple TCP/IP link
(obviously not the case for embedded databases).

At the JDBC level, because the API is a stack of interfaces, putting in
a dumping dynamic proxy should display the API level details (more
difficult if there is any casting going on).

Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
Reply With Quote
  #4  
Old 01-17-2006, 08:32 AM
Alan Krueger
Guest
 
Default Re: Snooping

Thomas Hawtin wrote:
> Roedy Green wrote:
>> Is there an official way to snoop on what the app and database say to
>> each other? Just what does PreparedStatement send? Just what does a
>> raw resultset coming back look like?

>
> At a TCP/IP level, directing through a straightforward dumping proxy
> should work. Assuming the driver is just using a a simple TCP/IP link
> (obviously not the case for embedded databases).


Ethereal may come in handy here, rather than using a proxy.

http://www.ethereal.com/
Reply With Quote
  #5  
Old 01-17-2006, 12:34 PM
Roedy Green
Guest
 
Default Re: Snooping

On Tue, 17 Jan 2006 09:37:49 +0000, Thomas Hawtin
<usenet@tackline.plus.com> wrote, quoted or indirectly quoted someone
who said :

>a dumping dynamic proxy


What one would you recommend?
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Reply With Quote
  #6  
Old 01-17-2006, 11:07 PM
Adam Maass
Guest
 
Default Re: Snooping


"Roedy Green" wrote:
> Is there an official way to snoop on what the app and database say to
> each other? Just what does PreparedStatement send? Just what does a
> raw resultset coming back look like?



Nothing official. Note that the wire-level protocol for each database and
JDBC driver will be different, so snooping at the wire level isn't going to
accomplish much -- unless you know (or can decode) that protocol.

P6Spy, http://www.p6spy.com/, does a pretty good job of logging the calls to
an underlying JDBC driver. Lower than that, and you're talking about
proprietary protocols...


-- Adam Maass


Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:24 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.