views:

61

answers:

0

Hi,

I am using Spring,ibatis. I have configured following in xml file

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"><value>${driverClassName}</value></property> <property name="url"><value>${url}</value></property> <property name="username"><value>${username}</value></property> <property name="password"><value>${password}</value></property> <property name="initialSize"><value>5</value></property> <property name="testOnBorrow"><value>true</value></property> </bean> i am not configuring any pool properties. Defaults are used. What are the defualt values for pool? I am executing following to get the results

getSqlMapClientTemplate().queryForList("getList", params);

But sometimes i am getting the error like Cannot get a connection, pool exhausted

When i try to print the log DEBUG [org.springframework.orm.ibatis.SqlMapClientTemplate] Opened SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@150262b] for iBATIS operation DEBUG [java.sql.Connection] {conn-100021} Connection DEBUG [org.springframework.orm.ibatis.SqlMapClientTemplate] Obtained JDBC Connection [org.apache.commons.dbcp.PoolableConnection@f9de08] for iBATIS operation DEBUG [java.sql.Connection] {conn-100021} Preparing Statement: XXX DEBUG [java.sql.PreparedStatement] {pstm-100025} Parameters: [] DEBUG [java.sql.PreparedStatement] {pstm-100025} Types: [java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String] DEBUG [java.sql.ResultSet] {rset-100026} ResultSet DEBUG [java.sql.ResultSet] {rset-100026} Header: ] 2010-09-20 16:10:59,016 DEBUG [java.sql.ResultSet] {rset-100026} Result:

Thats all i am seeing log. I am not seeing the closing connection statbment and all/. Can you help me what i am missing. Thank you for support