瀏覽代碼

remove jdbcTemplate in ThreadLocal after fetching it

sunyj 7 年之前
父節點
當前提交
4057fbaebe
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/main/java/com/uas/ps/product/sync/WaitSyncHelper.java

+ 1 - 0
src/main/java/com/uas/ps/product/sync/WaitSyncHelper.java

@@ -85,6 +85,7 @@ public class WaitSyncHelper {
             batchSize = syncRepository.getBatchSize();
             syncRepository.unsetSessionVariable();
         } else {
+            jdbcTemplates.remove();
             batchSize = jdbcTemplate.execute(new CallableStatementCreator() {
                 @Override
                 public CallableStatement createCallableStatement(Connection connection) throws SQLException {