mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-17 00:36:02 +10:00
[유치수] [NOBTS] add BLOC classpath
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@860 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -47,19 +47,28 @@ public class TomcatProfiler implements ClassFileTransformer {
|
||||
String[] paths = getTomcatlibPath();
|
||||
this.byteCodeInstrumentor = new JavaAssistByteCodeInstrumentor(paths);
|
||||
this.modifierRepository = createModifierRegistry(byteCodeInstrumentor);
|
||||
|
||||
}
|
||||
|
||||
private String[] getTomcatlibPath() {
|
||||
String catalinaHome = System.getProperty("catalina.home");
|
||||
if (catalinaHome == null) {
|
||||
return null;
|
||||
}
|
||||
if (logger.isLoggable(Level.INFO)) {
|
||||
logger.info("CATALINA_HOME=" + catalinaHome);
|
||||
}
|
||||
return new String[] {catalinaHome + "/lib/servlet-api.jar", catalinaHome + "/lib/catalina.jar"};
|
||||
}
|
||||
private String[] getTomcatlibPath() {
|
||||
String catalinaHome = System.getProperty("catalina.home");
|
||||
|
||||
if (catalinaHome == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (logger.isLoggable(Level.INFO)) {
|
||||
logger.info("CATALINA_HOME=" + catalinaHome);
|
||||
}
|
||||
|
||||
// TODO This is draft. How can we support both Tomcat and BLOC without this configuration?
|
||||
String type = System.getProperty("hippo.servertype", "tomcat");
|
||||
|
||||
if (type.equals("bloc")) {
|
||||
return new String[] { catalinaHome + "/server/lib/catalina.jar", catalinaHome + "/common/lib/servlet-api.jar" };
|
||||
} else {
|
||||
return new String[] { catalinaHome + "/lib/servlet-api.jar", catalinaHome + "/lib/catalina.jar" };
|
||||
}
|
||||
}
|
||||
|
||||
private ModifierRegistry createModifierRegistry(ByteCodeInstrumentor byteCodeInstrumentor) {
|
||||
DefaultModifierRegistry modifierRepository = new DefaultModifierRegistry(byteCodeInstrumentor, profilerConfig);
|
||||
|
||||
Reference in New Issue
Block a user