X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BDA32564E0 for ; Tue, 1 Mar 2005 11:50:13 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18786-09 for ; Tue, 1 Mar 2005 11:50:05 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id D4C6556560 for ; Tue, 1 Mar 2005 11:50:04 +0000 (GMT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1D65t6-0002yH-00; Wed, 02 Mar 2005 00:50:04 +1300 Message-ID: <422456E7.8060303@opencloud.com> Date: Wed, 02 Mar 2005 00:49:59 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0 (X11/20041228) X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?St=E9phane_RIFF?= Cc: pgsql-jdbc@postgresql.org Subject: Re: Connection pool problem References: <42242041.8030604@cerene.fr> In-Reply-To: <42242041.8030604@cerene.fr> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/6 X-Sequence-Number: 12399 Stéphane RIFF wrote: > I've create a connection pool with dbcp end another with > Jdbc3PoolingDatasource, > it seems to work well but : > My pool is a eight connections pool, the problem is when i get some > database exception (for example > "constraint violation", "duplicate key on unique index"...) the > connection didn't released to the pool. > After eight exception my application wait for a connection from the pool > which nerver give one because > of the PSQLException thrown. Perhaps your code does not release the connection to the pool correctly when handling the exception? The usual way to deal with this is to put connection releasing in a finally block, so it's sure to be run however you exit the try{} block. If it's not that, I'd need to see your code to debug this further. -O