[Mondrian] SqlStatement not closed

Matt Campbell mkambol at gmail.com
Tue Sep 29 15:57:48 EDT 2009


There are several places in the code base where RolapUtil.executeQuery() is
called outside of a try/catch/finally.  Since the statement .close() method
is typically called in the finally, this has the potential to cause
statements to be left open if an exception is thrown during the
.executeQuery().

We recently experienced this when we had a series of SQL queries fail with
an exception.  Each of those failures left the statement open, which meant
that the Semaphore never incremented its query count.  I think if the query
fails it should still close the statement.

Can/should we move the executeQuery() to within the try block in the handful
of places where it is invoked?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20090929/802c2c84/attachment.html 


More information about the Mondrian mailing list