Not familiar with Resin specifics, but most
J2EE containers have JMX services that have info like this. You may want to look to the Resin docs for anything that sounds JMX/MBean-ish for similar info. If not, you can always write your own
JDBC driver implementation that proxies around the real driver to install your own tracking. I had to do that once for a hideous legacy webapp that was leaking connections and it isn't that hard. Basically the same thing as creating mock objects for
unit testing.
Exercise the app, find the places that are leaking result sets, fix them, and go back to the original driver. Much more effective than trying to hack active connections, unless you are trying to be some form of hosting site and the problem is from code you can't fix.
[ March 09, 2006: Message edited by: Reid M. Pinchback ]