[Mondrian] SqlStatement not closed
Julian Hyde
jhyde at pentaho.com
Tue Sep 29 17:49:52 EDT 2009
_____
From: Matt Campbell [mailto:mkambol at gmail.com]
Sent: Tuesday, September 29, 2009 2:34 PM
To: jhyde at pentaho.com; Mondrian developer mailing list
Subject: Re: [Mondrian] SqlStatement not closed
Thanks Julian. I hadn't noticed that SqlStatement was calling close on
SQLException. We have a custom JDBC driver that in this case wasn't
throwing a SQLException (although it probably should have been).
Should the catch block in SqlStatement be broader than just SQLException?
Probably, yes. If you have a reproducible test case, add a 'catch
(Throwable)' to that block and see what is leaking out.
As a general policy I believe that Throwables that are not Exceptions should
not be caught -- or should at least be re-thrown -- but a temporary 'catch
Throwable' will allow you to assess the problem.
Julian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20090929/70a56b5f/attachment.html
More information about the Mondrian
mailing list