|
Thanks for the tip. I rewrote the code like you suggested and I’m still getting the warning. Any more ideas?
Mike
-----Original Message-----
I would structure this as follows to make sure the ResultSet is always closed and also so that you do not get a null pointer if the prepare statement throws:
blah blah blah...
finally { try { if(result != null) result.close(); if(statement != null) statement.close(); if(connection != null) connection.close(); } catch(SQLException e) { logger.error("whaddup?"); } }
|
Title: Message
- [JBoss-user] Quick JDBC question. Mike Youngstrom
- RE: [JBoss-user] Quick JDBC question. Mike Youngstrom
- Re: [JBoss-user] Quick JDBC question. harm
- RE: [JBoss-user] Quick JDBC question. Mike Youngstrom
- [JBoss-user] Update: XDoclet changes for JBoss Jon Barnett
- RE: [JBoss-user] Quick JDBC question. Rod Macpherson
- RE: [JBoss-user] Quick JDBC question. Mike Youngstrom
- RE: [JBoss-user] Quick JDBC question. Rod Macpherson
