[jboss-user] [Beginner's Corner] New message: "Re: [CachedConnectionManager] Closing a connection for you"
Mike Finn
do-not-reply at jboss.com
Wed Mar 10 10:10:13 EST 2010
User development,
A new message was posted in the thread "[CachedConnectionManager] Closing a connection for you":
http://community.jboss.org/message/531121#531121
Author : Mike Finn
Profile : http://community.jboss.org/people/mikefinnx
Message:
--------------------------------------------------------------
It's likely not the issue here, but you should always put your closes of resources in finally{}. If you get an exception thrown before your stmt.close(), the closes will never happen.
Something like -
finally
{
try { stmt.close(); } catch (Exception e) {}
try { conn.close(); } catch (Exception e) {}
}
Mike
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/531121#531121
More information about the jboss-user
mailing list