Re: Connection pool problem

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Stéphane RIFF <stephane(dot)riff(at)cerene(dot)fr>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Connection pool problem
Date: 2005-03-01 11:49:59
Message-ID: 422456E7.8060303@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2005-03-01 12:32:35 Re: impossible to update rows specifying columns with NULL
Previous Message sandrigo.lezcano@gmail.com 2005-03-01 11:43:05 string de conexao em JAVA