mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve monitor support
This commit is contained in:
@@ -170,7 +170,7 @@ public class Utils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static Boolean getBoolean(GenericServlet servlet, String key) {
|
||||
String property = servlet.getInitParameter(key);
|
||||
if ("true".equals(property)) {
|
||||
@@ -236,20 +236,6 @@ public class Utils {
|
||||
}
|
||||
}
|
||||
|
||||
private static int pid;
|
||||
|
||||
public final static int getPID() {
|
||||
if (pid == 0) {
|
||||
String name = ManagementFactory.getRuntimeMXBean().getName();
|
||||
|
||||
String[] items = name.split("@");
|
||||
|
||||
pid = Integer.parseInt(items[0]);
|
||||
}
|
||||
|
||||
return pid;
|
||||
}
|
||||
|
||||
private static Date startTime;
|
||||
|
||||
public final static Date getStartTime() {
|
||||
|
||||
Reference in New Issue
Block a user