ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vi am" <vi...@hotmail.com>
Subject Connection leak
Date Mon, 06 Jun 2005 19:24:27 GMT
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