From: | Dave Cramer <Dave(at)micro-automation(dot)net> |
---|---|
To: | Matthias Brunner <mb(at)blumenstrasse(dot)vol(dot)at> |
Cc: | Barry Lind <barry(at)xythos(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Calling Connection.close() in Connection.finalize() |
Date: | 2002-08-15 17:25:56 |
Message-ID: | 1029432357.1777.51.camel@inspiron.cramers |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Just tried your code with the latest dev driver and I didn't get an
exception
Dave
On Thu, 2002-08-15 at 13:16, Matthias Brunner wrote:
> On Thursday 15 August 2002 18:50, Barry Lind wrote:
> >
> > This is implemented and has been since 7.1.
> >
>
> I'm sorry to be such a pain in the neck :-) Created a test class now (file
> attached).
>
> $md5sum pgjdbc2.jar
> f4ed2deaa88e16e79ccfa1c5b1f5ca22 pgjdbc2.jar
> $export CLASSPATH=pgjdbc2.jar:.
> $javac PgTest.java
> $java PgTest
>
> Message in /var/log/postgresql:
> DEBUG: connection: host=127.0.0.1 user=mb database=mb
> DEBUG: pq_recvbuf: unexpected EOF on client connection
>
> When I call Connection.close() explicitly the second message does not appear.
>
> Versions:
> postgresql 7.2,
> JDBC driver for 7.2
> Sun JDK 1.4 (build 1.4.0_01-b03)
> Linux 2.4.18
> --
> Matthias Brunner <mb(at)blumenstrasse(dot)vol(dot)at>
> PGP FP 7862 32B3 3B75 292A F76F 5042 8587 21AB 5B89 D501
> Check out http://blumenstrasse.vol.at/~mb/gpgkey.asc
> ----
>
> import java.sql.Connection;
> import java.sql.DriverManager;
>
> public class PgTest {
>
>
> public static void main(String[] args) {
>
> try {
> Class.forName("org.postgresql.Driver").newInstance();
> Connection con = DriverManager.getConnection(
> "jdbc:postgresql:mb?user=mb");
>
> //con.close();
>
> }
> catch (Exception e) {
> e.printStackTrace();
> }
> }
>
> }
> ----
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
From | Date | Subject | |
---|---|---|---|
Next Message | Matthias Brunner | 2002-08-15 17:38:50 | Re: Calling Connection.close() in Connection.finalize() |
Previous Message | Matthias Brunner | 2002-08-15 17:16:48 | Re: Calling Connection.close() in Connection.finalize() |