No automatic reconnect after network error
От | Markus Riehl |
---|---|
Тема | No automatic reconnect after network error |
Дата | |
Msg-id | 003301c65cb1$038f0830$15b2a8c0@pcmar02 обсуждение исходный текст |
Ответы |
Re: No automatic reconnect after network error
|
Список | pgsql-jdbc |
Hi all, JDBC Version: 8.1-405 (Type 3) Postgre SQL Version: 8.1.3 OS: Windows XP I have the PSQL database running on one server, my java application on another server. The java application is a server application that opens a database connection once at startup time. The server application uses PreparedStatements (threshold=0) that are also created at startup time. After a network error (to test I removed the network cable from the server where my java application is running for a few seconds), I get the following error message when using on of the PreparedStatements: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend. at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:214) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.j ava:437) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2St atement.java:353) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statem ent.java:257) ... Using MySQL or SAPDB, the JDBC driver is automatically reconnecting to the database when the connection is up again. Is there a way to use the PSQL driver the same way? How is this problem handled within Connection Pools (used within a servlet environment)? Is the pool deleting "dead" connections automatically and is creating new ones? Thanks in advance Markus
В списке pgsql-jdbc по дате отправления: