mirror of
https://github.com/apache/struts.git
synced 2026-08-07 15:46:57 +00:00
A proper way to close the db connection
This commit is contained in:
+5
-1
@@ -386,7 +386,11 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe
|
||||
LOG.error("Error producing {} report for uri {}", format, systemId, e);
|
||||
throw new ServletException(e.getMessage(), e);
|
||||
} finally {
|
||||
conn.close();
|
||||
try {
|
||||
conn.close();
|
||||
} catch (Exception e) {
|
||||
LOG.warn("Could not close db connection properly", e);
|
||||
}
|
||||
}
|
||||
|
||||
response.setContentLength(output.size());
|
||||
|
||||
Reference in New Issue
Block a user