ConnPoolWatch.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:1k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312"%>
- <%@ page import="com.gforce.currency.database.*,javax.servlet.*,javax.servlet.http.*,java.io.*,java.util.*" %>
- <html>
- <head>
- <title>数据库连接池监视</title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="REFRESH" content="1;URL=ConnPoolWatch.jsp">
- <script language="JavaScript">
- setTimeout("self.location.reload();",1000);
- </script>
- </head>
- <body>
- <%
- Hashtable pools = ConnectionPool.getConnPools();
- out.println("<p align="center"><font size="32px" color="#008800">数据库连接池监视</font></p><p>当前共有" + pools.size() + "个连接池被激活!</p>");
- for(int i=0;i<pools.size();i++)
- {
- DBConnectionPool connPool = (DBConnectionPool)pools.values().toArray()[i];
- out.println("<hr>");
- out.println("<p>连接池名称:" + connPool.Name + "</p>");
- out.println("<p>最大连接数:" + connPool.intMaxConn + "</p>");
- out.println("<p>当前连接数:" + connPool.ConnCount + "</p>");
- out.println("<p>空闲连接数:" + connPool.FreeConn.size() + "</p>");
- out.println("<p>繁忙连接数:" + connPool.BusyConn.size() + "</p>");
- }
- %>
- </body>
- <html>