From: Simon Brandhof Date: Thu, 2 Feb 2012 11:20:59 +0000 (+0100) Subject: Fix JDBC batch mode in MyBatis X-Git-Tag: 2.14~194 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=14a9dcb21b2e2adaf96540e9afa79d7ee397ed2b;p=sonarqube.git Fix JDBC batch mode in MyBatis --- diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/BatchSession.java b/sonar-core/src/main/java/org/sonar/core/persistence/BatchSession.java index da48c5f6c76..0e7a28a63c7 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/BatchSession.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/BatchSession.java @@ -31,7 +31,7 @@ import java.util.Map; public final class BatchSession implements SqlSession { - public static final int MAX_BATCH_SIZE = 250; + public static final int MAX_BATCH_SIZE = 1000; private final SqlSession session; private final int batchSize; @@ -170,7 +170,7 @@ public final class BatchSession implements SqlSession { } public T getMapper(Class type) { - return session.getMapper(type); + return getConfiguration().getMapper(type, this); } public Connection getConnection() {