[강운덕] [LUCYSUS-1744] jdbc api 인터셉터는 system class loader에서 생성되도록 변경.

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@653 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Woonduk Kang
2012-09-13 09:53:19 +00:00
parent 3826674714
commit 2feaa3c57f
5 changed files with 32 additions and 11 deletions
@@ -8,6 +8,7 @@ import java.util.logging.Logger;
import com.profiler.interceptor.Interceptor;
import com.profiler.interceptor.bci.InstrumentException;
import com.profiler.interceptor.bci.JavaAssistClass;
import com.profiler.modifier.db.mysql.interceptors.ExecuteQueryMethodInterceptor;
import javassist.*;
import com.profiler.interceptor.bci.ByteCodeInstrumentor;
@@ -36,7 +37,8 @@ public class MySQLStatementModifier extends AbstractModifier {
try {
InstrumentClass statementClass = byteCodeInstrumentor.getClass(javassistClassName);
Interceptor interceptor = newInterceptor(classLoader, protectedDomain, "com.profiler.modifier.db.mysql.interceptors.ExecuteQueryMethodInterceptor");
// Interceptor interceptor = newInterceptor(classLoader, protectedDomain, "com.profiler.modifier.db.mysql.interceptors.ExecuteQueryMethodInterceptor");
Interceptor interceptor = new ExecuteQueryMethodInterceptor();
statementClass.addInterceptor("executeQuery", new String[]{"java.lang.String"}, interceptor);