When deciding whether to instrument a method, the agent examines a class's superclasses, but not the interfaces they implement. As a result, it will fail to hook the class's methods.
For example, the java.sql.Connection object returned by Oracle's JDBC driver is a T2CConnection, which has a class hierarchy that looks like this:
(where lines starting with - are interfaces, those without are classes). If a hook is specified for java.sql.Connection, none of the methods in T2CConnection will be instrumented.
When deciding whether to instrument a method, the agent examines a class's superclasses, but not the interfaces they implement. As a result, it will fail to hook the class's methods.
For example, the
java.sql.Connection
object returned by Oracle's JDBC driver is aT2CConnection
, which has a class hierarchy that looks like this:(where lines starting with
-
are interfaces, those without are classes). If a hook is specified forjava.sql.Connection
, none of the methods in T2CConnection will be instrumented.