PooledConnectionImpl should call connectionErrorOccurred on listeners on connection error (per spec)
В списке pgsql-jdbc по дате отправления:
| От | Csaba Nagy |
|---|---|
| Тема | PooledConnectionImpl should call connectionErrorOccurred on listeners on connection error (per spec) |
| Дата | |
| Msg-id | 1048179047.1031.40.camel@coppola.ecircle.de обсуждение исходный текст |
| Ответы |
Patch attached
|
| Список | pgsql-jdbc |
Hi all, The current implementation of the "PooledConnectionImpl" is not calling the connectionErrorOccurred callback on the registered listeners, as it is required by the JDBC spec. Our connection pool implementation uses that callback to mark the connection as invalid, and remove it from the pool. You can test the behavior if you set up a connection pool, start up your app server, and then restart the postgres server, and try to access the database. If the connection pool implementation doesn't have some special code to detect connection failure, the already created PooledConnections will be unusable, but the connectionErrorOccurred callback will never be called. This can be worked around in the connection pool implementation, but is not conforming to the spec. I've attached a patch which will just simply call the callback method before throwing exceptions in the "getConnection" method. Please apply the patch if it makes sens to you too... Thanks, Csaba.
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера