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 18:52:34 GMT
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" />

Or,  do I have to use  DAO  or  Spring framework to close the connections?

Thank you.

View raw message