Closed WestFarmer closed 3 years ago
Maybe the method is overridden in a subclass? Instead of named
, try wrapping this with hasSuperType
. Also, add a listener to see if some instrumentation is failing.
@raphw
you are right , I shoud intercept on org.apache.common.dbcp.PoolableConnection
, which is subclass of org.apache.common.dbcp.DelegatingConnection
, it overide 'close' mthod...
I finally got everything works, my agent helped a legacy project find a stupid jdbc connection leak problem.
thanks for you creating this great tool bytebuddy.
@raphw
in my intercepting method, is callable.call();
means call the original method ?
Yes.
my goal: intercept jdbc connection pool connection creation and closing event.
my java gent :
my interceptor:
but when testing with dpcp 1.4 on tomcat, I can only get two times close method intercepted, but according to applciation log where is much more connection closing event, I see a lot logs like below
what's wrong with my code? need some suggestion.