Skip site navigation (1) Skip section navigation (2)

"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 (view raw or flat)
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

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group