ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Modrzewski" <nmodrzew...@eaglexm.com>
Subject RE: FW: Connection Closing Problem
Date Wed, 03 Jun 2009 05:51:41 GMT
Thanks for the suggestion.  My connections are now being closed.


This list has been great. I want to thank everyone for helping me solve


n  Nathan


From: Clinton Begin [mailto:clinton.begin@gmail.com] 
Sent: Tuesday, June 02, 2009 10:34 PM
To: user-java@ibatis.apache.org
Subject: Re: FW: Connection Closing Problem


Here's a simple unpooled datasource implementation....





On Tue, Jun 2, 2009 at 10:32 PM, Clinton Begin <clinton.begin@gmail.com>

For standalone applications, you probably should not use a Connection
Pool.  In other words, you should either pass in your own connection, or
use a non-pooling datasource implementation.  I think you can achieve
this effect by setting the max idle connections on SimpleDataSource to
0, or you can just implement your own datasource and plug it into


The other way you could deal with it would be to cast the DataSource to
SimpleDataSource and call .forceCloseAll().  





On Tue, Jun 2, 2009 at 9:59 PM, Nathan Modrzewski
<nmodrzewski@eaglexm.com> wrote:

I will look at doing that. Thanks for the info.


n  Nathan


From: Nicholoz Koka Kiknadze [mailto:kiknadze@gmail.com] 
Sent: Tuesday, June 02, 2009 3:02 PM

To: user-java@ibatis.apache.org
Subject: Re: FW: Connection Closing Problem


I think what happens to open (pooled) connection upon JVM exit depends
on JDBC driver.

IMO if you were using SimpleDataSource of iBatis, you'd have to call
forceCloseAll() to close all pooled connections at the end of execution
of your app (I think I have even used that years ago).  Not sure about
DBCP, but I bet  calling  basicDataSource.close() must help.


On Wed, Jun 3, 2009 at 12:18 AM, Nathan Modrzewski
<nmodrzewski@eaglexm.com> wrote:

Not yet...getting ready too.


If I'm using Apache Dbcp to handle connection pooling, do I have to
manually close the pooling objects?






View raw message