db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TomohitoNakayama" <tomon...@basil.ocn.ne.jp>
Subject Trap of ConnectionPool in DERBY-273
Date Sun, 26 Jun 2005 14:33:18 GMT
Hello.

I was trapped in DERBY-273.

Implementing of waiting connection to be closed was done.
However , I found problem that connection obtained from DataSource object 
was not physically closed
when "-Dframework=DerbyNet" was specified and then waiting processing never 
finished.

It seems that DataSource class implemented in IBM Universal JDBC Driver was 
acting as connection pool and
connection was not closed even if close method was called ...
I surveyed DB2 site of IBM and could not found way to force DataSource to 
close pooled connection.


Now I think next 2 walk round.

walk round 1:
Kick garbage collection and encourage DataSource object to close pooled 
connection,
though execution of gc is not guranteed.

Concretely, set variable , which refers DataSource object , as null and 
execute System.gc().
This would encourage DataSource object to close pooled connection.

Using jdb, I saw this works in sun jdk 1.4.

walk round 2:
If connection was not closed after number of checks,
force shutdown.

We could expect needed rollback process would be finished.
In the worse case, test was just failed.


If there are some any other idea, please advise me.


Best regards.


/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/ 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.1/28 - Release Date: 2005/06/24


Mime
View raw message