diff --git a/src/main/java/com/nhn/pinpoint/profiler/modifier/db/mysql/MySQLLoadBalancedMySQLConnectionModifier.java b/src/main/java/com/nhn/pinpoint/profiler/modifier/db/mysql/MySQLLoadBalancedMySQLConnectionModifier.java deleted file mode 100644 index d283050b4..000000000 --- a/src/main/java/com/nhn/pinpoint/profiler/modifier/db/mysql/MySQLLoadBalancedMySQLConnectionModifier.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.nhn.pinpoint.profiler.modifier.db.mysql; - -import com.mysql.jdbc.LoadBalancedMySQLConnection; -import com.nhn.pinpoint.bootstrap.Agent; -import com.nhn.pinpoint.bootstrap.interceptor.Interceptor; -import com.nhn.pinpoint.profiler.interceptor.bci.ByteCodeInstrumentor; -import com.nhn.pinpoint.profiler.interceptor.bci.InstrumentClass; -import com.nhn.pinpoint.profiler.interceptor.bci.InstrumentException; -import com.nhn.pinpoint.profiler.modifier.AbstractModifier; -import com.nhn.pinpoint.profiler.modifier.db.interceptor.DriverConnectInterceptor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.security.ProtectionDomain; - -/** - * @author emeroad - */ -public class MySQLLoadBalancedMySQLConnectionModifier extends AbstractModifier { - - private final Logger logger = LoggerFactory.getLogger(this.getClass()); - - public MySQLLoadBalancedMySQLConnectionModifier(ByteCodeInstrumentor byteCodeInstrumentor, Agent agent) { - super(byteCodeInstrumentor, agent); - } - - public String getTargetClass() { - return "com/mysql/jdbc/LoadBalancedMySQLConnection"; - } - - public byte[] modify(ClassLoader classLoader, String javassistClassName, ProtectionDomain protectedDomain, byte[] classFileBuffer) { - if (logger.isInfoEnabled()) { - logger.info("Modifing. {}", javassistClassName); - } - // 여기는 추상클래스로 빼서 - this.byteCodeInstrumentor.checkLibrary(classLoader, javassistClassName); - try { - InstrumentClass mysqlConnection = byteCodeInstrumentor.getClass(javassistClassName); - - - - Interceptor createConnection = new DriverConnectInterceptor(); - String[] params = new String[]{ - "java.lang.String", "java.util.Properties" - }; - mysqlConnection.addInterceptor("connect", params, createConnection); - - if (this.logger.isInfoEnabled()) { - this.logger.info("{} class is converted.", javassistClassName); - } - - return mysqlConnection.toBytecode(); - } catch (InstrumentException e) { - if (logger.isWarnEnabled()) { - logger.warn("{} modify fail. Cause:{}", this.getClass().getSimpleName(), e.getMessage(), e); - } - return null; - } - } -}