mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add jconsole support
This commit is contained in:
@@ -1,8 +1,19 @@
|
||||
package com.alibaba.druid.support.jconsole;
|
||||
|
||||
import javax.management.MBeanServerConnection;
|
||||
import javax.management.ObjectName;
|
||||
|
||||
import com.alibaba.druid.stat.DruidStatService;
|
||||
|
||||
public class DruidSQLPanel extends DruidPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected void doInBackground(MBeanServerConnection conn) throws Exception {
|
||||
ObjectName name = new ObjectName(DruidStatService.MBEAN_NAME);
|
||||
String url = "/sql.json";
|
||||
String result = (String) conn.invoke(name, "service", new String[] { url }, new String[] { String.class.getName() });
|
||||
|
||||
System.out.println("doInBackground");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user