使用java/Spring/Ibatis sqlserver
是數據庫和datasource
是org.apache.commons.dbcp.BasicDataSource
以下是數據源對象我想公開實時連接池計數,如正在使用中的數量和多少在閒置和我想用jmx
任何快的想法來監控如何實現jmx彈出數據源連接管理器以暴露實時連接數
<bean id="wssModelDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="net.sourceforge.jtds.jdbcx.JtdsDataSource"/>
<property name="url" value="com.wss.jdbc.ConnectionUrl=jdbc:jtds:sqlserver://x-x2/x_control_QA;appName=wss;sendStringParametersAsUnicode=false;loginTimeout=20;socketTimeout=180"/>
<property name="username" value="xxx"/>
<property name="password" value="xxx"/>
<property name="maxActive" value="10"/>
<property name="maxWait" value="10000"/>
</bean>