MAVEN_OPTS='-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8765'
transport
这里通常使用套接字传输。但是在 Windows 平台上也可以使用共享内存传输。
server
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>keytool-maven-plugin</artifactId> | |
<version>1.1</version> | |
<executions> | |
<execution> | |
<phase>generate-resources</phase> | |
<id>clean</id> |
import com.sun.btrace.annotations.*; | |
import static com.sun.btrace.BTraceUtils.*; | |
@BTrace | |
public class TracingScript { | |
public static int count = 0; | |
@OnMethod(clazz = "java.lang.Thread", method = "start") | |
public static void onNewThread() { |
MAVEN_OPTS='-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8765'
transport
这里通常使用套接字传输。但是在 Windows 平台上也可以使用共享内存传输。
server
for pid in `ps -ef |grep java| grep -v 'grep'| awk '{print $2}'` | |
do | |
cat /proc/$pid/status |grep Threads | awk '{print $2}' | |
done |
<build> | |
<resources> | |
<resource> | |
<directory>src/main/java</directory> | |
</resource> | |
</resources> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> |
/* | |
* Copyright 2012-2015 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
diff --git a/src/main/java/com/alibaba/druid/support/logging/LogFactory.java b/src/main/java/com/alibaba/druid/support/logging/LogFactory.java | |
index dbdc21a..fe6f467 100644 | |
--- a/src/main/java/com/alibaba/druid/support/logging/LogFactory.java | |
+++ b/src/main/java/com/alibaba/druid/support/logging/LogFactory.java | |
@@ -23,9 +23,7 @@ | |
private static Constructor logConstructor; | |
static { | |
- // TODO add slf4j logging | |
- |
JAVA_HOME=/usr/lib/jvm/java-7-sun | |
OUTPUT_HOME=/var/log/webapps/cs/ | |
DEPLOY_HOME=/usr/local/apache-tomcat-7.0.26-cs | |
HOST_NAME=`hostname` | |
DUMP_PIDS=`ps --no-heading -C java -f --width 1000 | grep "$DEPLOY_HOME" |awk '{print $2}'` | |
if [ -z "$DUMP_PIDS" ]; then | |
echo "The server $HOST_NAME is not started!" | |
exit 1; | |
fi |
1.在项目父pom中添加build插件: | |
<plugin> | |
<groupId>org.eclipse.jetty</groupId> | |
<artifactId>jetty-maven-plugin</artifactId> | |
<version>9.1.0.v20131115</version> | |
<configuration> | |
<reload>automatic</reload> | |
</configuration> | |
</plugin> | |
1.在web项目pom里面添加build插件 | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-war-plugin</artifactId> | |
<version>2.4</version> | |
<configuration> | |
<webResources> | |
<resource> | |
<directory>src/main/webapp</directory> | |
<includes> |