jconsole plugin

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@223 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-05-31 07:41:38 +00:00
parent 46ae07bbbc
commit c817356ba8
2 changed files with 129 additions and 0 deletions
@@ -22,6 +22,7 @@ import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTree;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreePath;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.stat.JdbcStatManager;
@@ -92,6 +93,8 @@ public class DruidPanel extends JPanel {
}
protected Object doInBackground(JConsoleContext context) throws Exception {
//dataSourcesNode.removeAllChildren();
MBeanServerConnection conn = context.getMBeanServerConnection();
List<ObjectInstance> stats = new ArrayList<ObjectInstance>();
List<ObjectInstance> dataSourceInstances = new ArrayList<ObjectInstance>();
@@ -156,6 +159,9 @@ public class DruidPanel extends JPanel {
dataSourcesNode.add(dataSource);
}
TreePath path = new TreePath(dataSourcesNode.children());
tree.scrollPathToVisible(path);
return null;
}