Re: A JDBC bug or problem relating to string length in Java

From: joe user <palehaole(at)yahoo(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: A JDBC bug or problem relating to string length in Java
Date: 2003-09-02 02:03:33
Message-ID: 20030902020333.7244.qmail@web20420.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


--- Oliver Jowett <oliver(at)opencloud(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message joe user 2003-09-02 02:05:21 Re: A JDBC bug or problem relating to string length in Java
Previous Message Kris Jurka 2003-09-02 02:02:08 Re: A JDBC bug or problem relating to string length in Java