Re: Connection pool problem

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Connection pool problem
Дата
Msg-id 422456E7.8060303@opencloud.com
обсуждение исходный текст
Ответ на Connection pool problem  (Stéphane RIFF <stephane.riff@cerene.fr>)
Ответы Re: Connection pool problem  (Stéphane RIFF <stephane.riff@cerene.fr>)
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "sandrigo.lezcano@gmail.com"
Дата:
Сообщение: string de conexao em JAVA
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: impossible to update rows specifying columns with NULL