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 Wed, 08 Jun 2005 01:35:55 GMT
this looks like a repost of some sort.

On 6/6/05, vi am <vi_am@hotmail.com> wrote:
> I am evaluating iBATIS.   How can we close connections to avoid connection
> leak?   Does documentation mention anywhere  that "connections are
> automatically closed"?
> 
> 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?
> 
> Thank you.
> 
> 
>

Mime
View raw message