ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: Connection leak
Date Mon, 06 Jun 2005 19:45:48 GMT
The connections are returned to the pool automatically. Your pool
implementation determines how to manage the connections. So, you will
see connections staying active because they continue to exist in the
pool. iBatis merly checks them out and uses them. So, there is no
connection leak in iBatis.

Brandon

On 6/6/05, vi am <vi_am@hotmail.com> wrote:
> I am evaluating iBATIS.   How can we close connections to avoid connection
> leak?   Are the connections are automatically closed?.... couldn't find this
> anywhere in the documentation.
> 
> The following SQL statement shows connections getting incremented for every
> JSP page access.
> 
> ******************************************
> select program, MACHINE, status, schemaname, count(*)
> from v$session
> where schemaname = 'MY_SCHEMA'
> and   status <> 'KILLED'
> group by program, machine, status, schemaname;
> ******************************************
> 
> Development environment:   Tomcat 4.1.30,  Oracle 8i,  iBATIS for Java SQL
> Mapper version 2.0  (no DAO just yet),
> 
> Here is part of the sql-map-config.xml  file:
> 
> ******************************************
> <transactionManager type="JDBC">
>   <dataSource type="DBCP">
>     <property name="JDBC.Driver" value="${driver}" />
>     <property name="JDBC.ConnectionURL" value="${url}" />
>     <property name="JDBC.Username" value="${username}" />
>     <property name="JDBC.Password" value="${password}" />
> <property name="JDBC.DefaultAutoCommit" value="true" />
>     <property name="Pool.MaximumActiveConnections" value="3" />
>     <property name="Pool.MaximumIdleConnections" value="2" />
>     <property name="Pool.MaximumWait" value="1000" />
>   </dataSource>
> </transactionManager>
> ******************************************
> 
> Or,  do I have to use  DAO  or  Spring framework to close the connections
> automatically?
> 
> Thank you.
> 
> 
>

Mime
View raw message