Commit aa55121b authored by ascrutae's avatar ascrutae
Browse files

refactory code

parent 3f2e7904
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -49,8 +49,6 @@ import static org.skywalking.apm.plugin.jdbc.define.Constants.SERVICE_METHOD_INT
 */
public abstract class ConnectionInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {

    public static final String ENHANCE_CLASS = "com.mysql.jdbc.ConnectionImpl";

    @Override protected ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
        return new ConstructorInterceptPoint[0];
    }
+5 −1
Original line number Diff line number Diff line
@@ -29,7 +29,11 @@ import static org.skywalking.apm.plugin.jdbc.mysql.define.MultiClassNameMatch.by
 * @author zhangxin
 */
public class Mysql5xConnectionInstrumentation extends ConnectionInstrumentation {
    public static final String ENHANCE_CLASS = "com.mysql.jdbc.ConnectionImpl";

    public static final String CJ_JDBC_ENHANCE_CLASS = "com.mysql.cj.jdbc.ConnectionImpl";

    @Override protected ClassMatch enhanceClass() {
        return byMultiClassMatch(ENHANCE_CLASS, "com.mysql.cj.jdbc.ConnectionImpl");
        return byMultiClassMatch(ENHANCE_CLASS, CJ_JDBC_ENHANCE_CLASS);
    }
}