aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-05-15 17:50:51 +0300
committerVaadin Code Review <review@vaadin.com>2015-05-18 12:03:47 +0000
commit10b81b13814d345c3c273999ebb4af21b7dafa35 (patch)
treed5e1bcfce6543e4bf0942481cfc3727c6206dff8 /server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java
parent7a8227d3a4a00ed0033697792fcecd99d56b9d47 (diff)
downloadvaadin-framework-10b81b13814d345c3c273999ebb4af21b7dafa35.tar.gz
vaadin-framework-10b81b13814d345c3c273999ebb4af21b7dafa35.zip
Make TableQuery only release connections reserved through its pool (#12370)
Updated all SQLContainer tests to track that connection are correctly reserved and released Change-Id: I3f12527683a19d44a2db265491b6ba9331c0980b
Diffstat (limited to 'server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java')
-rw-r--r--server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java b/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java
index bb000bd8f5..9a41766a31 100644
--- a/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java
+++ b/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java
@@ -213,8 +213,8 @@ public class TableQuery extends AbstractTransactionalQuery implements
} finally {
try {
if (r != null) {
- releaseConnection(r.getStatement().getConnection(),
- r.getStatement(), r);
+ // Do not release connection, it is done in commit()
+ releaseConnection(null, r.getStatement(), r);
}
} finally {
if (shouldCloseTransaction) {
@@ -774,8 +774,8 @@ public class TableQuery extends AbstractTransactionalQuery implements
} finally {
try {
if (rs != null) {
- releaseConnection(rs.getStatement().getConnection(),
- rs.getStatement(), rs);
+ // Do not release connection, it is done in commit()
+ releaseConnection(null, rs.getStatement(), rs);
}
} finally {
if (shouldCloseTransaction) {