Re: How to kill a connection

From: Kris Jurka <books(at)ejurka(dot)com>
To: Bob Rivers <bobrivers(at)pobox(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: How to kill a connection
Date: 2003-12-09 21:16:13
Message-ID: Pine.LNX.4.33.0312091613200.3369-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 9 Dec 2003, Bob Rivers wrote:

> Hi,
>
> I have a problem, and I don't know how to solve it.
>
> We have a web application (done in java/jsp, running under tomcat
> 4.1.29/j2sdk 1.4.2) that establishes a connection with postgres 7.3.2.
>
> We are using jdbc (7.3.1) to do it, but we are not using connection
> pool (my client security police determine that all connections to the
> database must be done per user basis).
>
> So, when the user do the login, we create a connection to this user.
> When the user closes the application, we close the connection. No
> problem, everything works well.
>
> But, if the user closes the window abnormally (for example, shutting
> down the browser window without clicking my application logoff button)
> the connection opend will be open forever.
>

Where do you store this connection object? It seems like a scalability
problem to maintain a persistent connection per user. Why not create and
close a connection on each request?

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2003-12-09 21:21:06 Re: SET AUTOCOMMIT TO OFF is no longer supported
Previous Message Kris Jurka 2003-12-09 21:11:14 Re: JDBC encoding