diff --git a/src/main/java/org/opencadc/tap/impl/QServQueryRunner.java b/src/main/java/org/opencadc/tap/impl/QServQueryRunner.java index 34582e3..4140d4b 100644 --- a/src/main/java/org/opencadc/tap/impl/QServQueryRunner.java +++ b/src/main/java/org/opencadc/tap/impl/QServQueryRunner.java @@ -371,6 +371,7 @@ private void doIt() // and restrict to forward only so that client memory usage is minimal since // we are only interested in reading the ResultSet once + connection.setAutoCommit(false); pstmt = connection.prepareStatement(sql); pstmt.setFetchSize(1000); pstmt.setFetchDirection(ResultSet.FETCH_FORWARD); diff --git a/src/main/java/org/opencadc/tap/impl/ResultStoreImpl.java b/src/main/java/org/opencadc/tap/impl/ResultStoreImpl.java index 4462a78..2a432b2 100644 --- a/src/main/java/org/opencadc/tap/impl/ResultStoreImpl.java +++ b/src/main/java/org/opencadc/tap/impl/ResultStoreImpl.java @@ -103,8 +103,7 @@ public class ResultStoreImpl implements ResultStore { public URL put(final ResultSet resultSet, final TableWriter resultSetTableWriter) throws IOException { - OutputStream os; - os = getOutputStream(); + OutputStream os = getOutputStream(); resultSetTableWriter.write(resultSet, os); os.close(); return getURL(); @@ -113,8 +112,7 @@ public URL put(final ResultSet resultSet, @Override public URL put(Throwable throwable, TableWriter tableWriter) throws IOException { - OutputStream os; - os = getOutputStream(); + OutputStream os = getOutputStream(); tableWriter.write(throwable, os); os.close(); return getURL(); @@ -124,8 +122,7 @@ public URL put(Throwable throwable, TableWriter tableWriter) public URL put(final ResultSet resultSet, final TableWriter resultSetTableWriter, final Integer integer) throws IOException { - OutputStream os; - os = getOutputStream(); + OutputStream os = getOutputStream(); if (integer == null) { resultSetTableWriter.write(resultSet, os);