Re: A JDBC bug or problem relating to string length in Java - Mailing list pgsql-jdbc

From joe user
Subject Re: A JDBC bug or problem relating to string length in Java
Date
Msg-id 20030902020333.7244.qmail@web20420.mail.yahoo.com
Whole thread Raw
In response to Re: A JDBC bug or problem relating to string length in Java  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: A JDBC bug or problem relating to string length in Java
List pgsql-jdbc
--- Oliver Jowett <oliver@opencloud.com> wrote:
> Do the close() in a finally block. It's good
> practice anyway.

That's a good idea, but unfortunately
Connection.close() throws SQLException, so I would
have to do something like this:

try { }
catch { }
finally {
    try { db.close(); }
    catch(SQLException e) { log(...); }
}

This works... but isn't Java/JDBC supposed to make our
lives easier, and focus on the problem we're solving
instead of putting in extra hard-to-read boilerplate
code (a try/catch nested inside a finally block)?

I think I'm going to convert everything to JDO so the
JDO implementor can handle ALL of this stuff.


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: A JDBC bug or problem relating to string length in Java
Next
From: joe user
Date:
Subject: Re: A JDBC bug or problem relating to string length in Java