long end = System.currentTimeMillis();
log.info(Thread.currentThread().getName() + ": Query [" + query + "] handled in [" + (end - start)
+ "] ms.");
return result;
} catch(SQLException e) {
throw new EngineException(e);
} catch(JSONSerDeException e) {
throw new EngineException(e);
} finally {
try {
if(rs != null) {
rs.close();
}
if(stmt != null) {
stmt.close();
}
connection.close();
} catch(SQLException e) {
throw new EngineException(e);
}
}
}