--- 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