"persistent" connection in a Servlet

From: "Nikola Milutinovic" <Nikola(dot)Milutinovic(at)ev(dot)co(dot)yu>
To: "PostgreSQL JDBC" <pgsql-jdbc(at)postgresql(dot)org>
Subject: "persistent" connection in a Servlet
Date: 2001-12-28 10:02:55
Message-ID: 001801c18f86$d1ee2780$0a3ea8c0@ev.co.yu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi all.

One question. Suppose I write a servlet which uses one JDBC connection, initializing it not per-request, but once it is loaded. Similarly it closes the connection not after the request has been serviced, but only when the servlet is unloaded. This means that JDBC connection will be opened and held open for a long time, with sporadic interactions.

What happens if I shutdown the database, while JDBC connection is open and bring it up again? Will it try to reconnect or do I have to check for status?

Nix.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2001-12-28 14:00:04 Re: SOLVED: Problem with connecting to postgres using JDBC with JSP, but not JDBC with Java
Previous Message Peter Adamek 2001-12-28 09:17:18 SOLVED: Problem with connecting to postgres using JDBC with JSP, but not JDBC with Java