diff --git a/repository/pom.xml b/repository/pom.xml index 3b1e842695..b182bcc49d 100644 --- a/repository/pom.xml +++ b/repository/pom.xml @@ -427,12 +427,12 @@ org.mybatis mybatis - 3.3.0 + 3.5.9 org.mybatis mybatis-spring - 1.2.5 + 2.0.6 diff --git a/repository/src/main/java/org/alfresco/ibatis/SqlSessionMetricsWrapper.java b/repository/src/main/java/org/alfresco/ibatis/SqlSessionMetricsWrapper.java index 69435cdaa9..668f56fb7f 100644 --- a/repository/src/main/java/org/alfresco/ibatis/SqlSessionMetricsWrapper.java +++ b/repository/src/main/java/org/alfresco/ibatis/SqlSessionMetricsWrapper.java @@ -2,7 +2,7 @@ * #%L * Alfresco Repository * %% - * Copyright (C) 2005 - 2021 Alfresco Software Limited + * Copyright (C) 2005 - 2022 Alfresco Software Limited * %% * This file is part of the Alfresco software. * If the software was purchased under a paid Alfresco license, the terms of @@ -28,6 +28,7 @@ package org.alfresco.ibatis; import org.alfresco.metrics.db.DBMetricsReporter; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.ibatis.cursor.Cursor; import org.apache.ibatis.executor.BatchResult; import org.apache.ibatis.session.Configuration; import org.apache.ibatis.session.ResultContext; @@ -246,6 +247,48 @@ public class SqlSessionMetricsWrapper implements SqlSession } } + @Override + public Cursor selectCursor(String statement) + { + long startTime = System.currentTimeMillis(); + try + { + return this.sqlSession.selectCursor(statement); + } + finally + { + reportQueryExecuted(startTime, SELECT_LABEL, statement); + } + } + + @Override + public Cursor selectCursor(String statement, Object parameter) + { + long startTime = System.currentTimeMillis(); + try + { + return this.sqlSession.selectCursor(statement, parameter); + } + finally + { + reportQueryExecuted(startTime, SELECT_LABEL, statement); + } + } + + @Override + public Cursor selectCursor(String statement, Object parameter, RowBounds rowBounds) + { + long startTime = System.currentTimeMillis(); + try + { + return this.sqlSession.selectCursor(statement, parameter, rowBounds); + } + finally + { + reportQueryExecuted(startTime, SELECT_LABEL, statement); + } + } + @Override public int insert(String statement) { diff --git a/repository/src/main/resources/alfresco/ibatis/org.alfresco.repo.domain.dialect.Dialect/tenants-common-SqlMap.xml b/repository/src/main/resources/alfresco/ibatis/org.alfresco.repo.domain.dialect.Dialect/tenants-common-SqlMap.xml index ec294384ab..493207bfdf 100644 --- a/repository/src/main/resources/alfresco/ibatis/org.alfresco.repo.domain.dialect.Dialect/tenants-common-SqlMap.xml +++ b/repository/src/main/resources/alfresco/ibatis/org.alfresco.repo.domain.dialect.Dialect/tenants-common-SqlMap.xml @@ -49,12 +49,12 @@ select - tenant_domain as tenantDomain, - version as version, - enabled as enabled, - tenant_name as tenantName, - content_root as contentRoot, - db_url as dbUrl + tenant_domain as tenant_domain, + version as version, + enabled as enabled, + tenant_name as tenant_name, + content_root as content_root, + db_url as db_url from alf_tenant diff --git a/repository/src/main/resources/alfresco/ibatis/org.alfresco.repo.domain.dialect.MySQLInnoDBDialect/node-select-children-SqlMap.xml b/repository/src/main/resources/alfresco/ibatis/org.alfresco.repo.domain.dialect.MySQLInnoDBDialect/node-select-children-SqlMap.xml index 7df7528b81..af1388f3fb 100644 --- a/repository/src/main/resources/alfresco/ibatis/org.alfresco.repo.domain.dialect.MySQLInnoDBDialect/node-select-children-SqlMap.xml +++ b/repository/src/main/resources/alfresco/ibatis/org.alfresco.repo.domain.dialect.MySQLInnoDBDialect/node-select-children-SqlMap.xml @@ -15,7 +15,7 @@ -