ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fitrah Elly Firdaus <fitrah.fird...@gmail.com>
Subject Re: Database Connections Not Closing
Date Mon, 12 Oct 2009 23:01:24 GMT
jborland wrote:
> I'm using iBatis for database access and frequently have problems with
> connections not being closed.  Here is a copy of my sqlMapConfig file:
>
> ============================
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE sqlMapConfig
>   PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
>   "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
>
> <sqlMapConfig>
>   <properties resource="ibatis.properties" />
>   
>   <settings
>    lazyLoadingEnabled="true"
>    cacheModelsEnabled="true"
>    enhancementEnabled="false"
>    useStatementNamespaces="false"
>   />
>
>   <transactionManager type="JDBC" commitRequired="true">
>     <dataSource type="DBCP">
>       <property name="driverClassName" value="${driver}" />
>       <property name="url" value="${url}" />
>       <property name="username" value="${username}" />
>       <property name="password" value="${password}" />
>       <property name="maxActive" value="10"/>
>       <property name="maxIdle" value="5"/>
>       <property name="maxWait" value="5000"/>
>       <property name="logAbandoned" value="true"/>
>       <property name="removeAbandoned" value="true"/>
>       <property name="removeAbandonedTimeout" value="1"/>
>       <property name="Driver.logUnclosedConnections" value="true"/>
>     </dataSource>
>   </transactionManager>
>   
>   <sqlMap resource="job-sqlMap.xml" />  
> </sqlMapConfig>
>
>
>   
usually I'm setting maxIdle to 1 and maxWait to 1,so with this only one 
connection may idle, another connection will disconnect.

Regards

Firdaus


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message