(mysql)DB 커넥션(connection)이 안끊길때 웹 소스 확인용
가끔 connection 풀이 나서 웹이 죽을때가 있다.
프레임워크를 안쓰고 생 jsp (model 1) 방식으로 개발하면 실수로 finally에 connection close를 잊어먹고 안쓰는 경우가 있어서, 프로젝트를 죽이는 사태가 발생한다.
그때를 위해서 페이지 마다 어디에서 connection이 올라가는 지 확인 할려고 만들었다
<%@ page language="java" contentType="text/html; charset=utf-8" %> <table> <tr> <td colspan='4' align='center'><b><%=dbname%></b> DataSource</td> </tr> <tr> <td height='24' align='center' alt='connections that are processing'># Active Connections</td> <td height='24' align='center' alt='total size of pool'>Maximum Active Connections</td> <td height='24' align='center' alt='connections that are idle in the pool'># of Idle Connections</td> <td height='24' align='center'>Maxium Wait period before timeout</td> </tr> <tr> <td align='right'><%=fontcolor%><%=bdsNumActive%></font></td> <td align='right'><%=bdsMaxActive%></td> <td align='right'><%=bdsNumIdle%></td> <td align='right'><%=bdsMaxWait%></td> </tr> </table>
<% |