From 72ad6232f969799dcf7f42cee43fc3897ccd7401 Mon Sep 17 00:00:00 2001
From: kcichonczyk <88378534+kcichonczyk@users.noreply.github.com>
Date: Thu, 24 Aug 2023 09:06:53 +0200
Subject: [PATCH] [ACS-5856] bump jakarta-transaction-api version, replace
javax.transaction with jakarta.transaction imports
---
.../RecordsManagementAuditServiceImpl.java | 2 +-
.../web/scripts/wiki/WikiRestApiTest.java | 4 +-
.../documentlibrary/FolderTemplateTest.java | 4 +-
.../SpringAwareUserTransaction.java | 16 +-
.../SpringAwareUserTransactionTest.java | 8 +-
pom.xml | 9 +-
.../repo/web/scripts/RepositoryContainer.java | 4 +-
.../web/scripts/person/UserCSVUploadPost.java | 6 +-
.../alfresco/repo/webdav/WebDAVServlet.java | 2 +-
.../auth/BaseSSOAuthenticationFilter.java | 2 +-
.../action/RunningActionRestApiTest.java | 52 +-
.../web/scripts/comment/CommentsApiTest.java | 4 +-
.../discussion/DiscussionRestApiTest.java | 4 +-
.../web/scripts/links/LinksRestApiTest.java | 4 +-
.../replication/ReplicationRestApiTest.java | 52 +-
.../repo/webdav/DeleteMethodTest.java | 4 +-
.../repo/webdav/GetMethodRegressionTest.java | 6 +-
.../alfresco/repo/webdav/PutMethodTest.java | 4 +-
.../webdav/WebDAVonContentUpdateTest.java | 2 +-
.../rest/api/tests/QueriesPeopleApiTest.java | 12 +-
.../workflow/api/impl/ProcessesImplTest.java | 6 +-
.../alfresco/AlfrescoTxDiskDriver.java | 6 +-
.../filesys/alfresco/FilesysTransaction.java | 4 +-
.../auth/ftp/AlfrescoFtpAuthenticator.java | 8 +-
.../auth/ftp/FTPAuthenticatorBase.java | 4 +-
.../filesys/repo/ContentDiskDriver.java | 4 +-
.../repo/importer/ExportSourceImporter.java | 4 +-
.../repo/importer/FileSourceImporter.java | 4 +-
.../importer/system/SystemInfoBootstrap.java | 52 +-
.../search/transaction/SimpleTransaction.java | 62 +-
.../transaction/SimpleTransactionManager.java | 66 +-
.../search/transaction/XidTransaction.java | 20 +-
.../repo/tenant/MultiTAdminServiceImpl.java | 52 +-
.../transaction/DummyTransactionService.java | 54 +-
.../RetryingTransactionHelper.java | 8 +-
.../transaction/TransactionServiceImpl.java | 52 +-
.../repo/transaction/TransactionUtil.java | 56 +-
.../AbstractManifestProcessorBase.java | 52 +-
.../repo/transfer/TransferServiceImpl2.java | 52 +-
.../repo/workflow/WorkflowDeployer.java | 4 +-
.../transaction/TransactionService.java | 56 +-
.../alfresco/encryption/EncryptionTests.java | 4 +-
.../alfresco/encryption/KeyStoreTests.java | 8 +-
.../filesys/repo/ContentDiskDriverTest.java | 2 +-
.../org/alfresco/opencmis/BaseCMISTest.java | 6 +-
.../action/ActionTrackingServiceImplTest.java | 864 +++++++++---------
.../executer/AsynchronousExtractorTest.java | 14 +-
...ueryBasedTemplateActionDefinitionTest.java | 6 +-
.../FreeMarkerModelLuceneFunctionTest.java | 4 +-
.../ScheduledPersistedActionServiceTest.java | 4 +-
.../repo/audit/access/AccessAuditorTest.java | 4 +-
.../impl/AbstractBulkImportTests.java | 14 +-
.../repo/bulkimport/impl/BulkImportTest.java | 12 +-
.../org/alfresco/repo/cache/CacheTest.java | 10 +-
.../AbstractReadOnlyContentStoreTest.java | 108 +--
.../content/RoutingContentServiceTest.java | 6 +-
.../repo/copy/CopyServiceImplTest.java | 4 +-
.../dictionary/DictionaryModelTypeTest.java | 4 +-
.../DictionaryRepositoryBootstrapTest.java | 4 +-
.../doclink/DocumentLinkServiceImplTest.java | 6 +-
.../repo/domain/audit/AuditDAOTest.java | 4 +-
.../repo/i18n/MessageServiceImplTest.java | 4 +-
.../alfresco/repo/imap/ImapMessageTest.java | 2 +-
.../repo/imap/ImapServiceImplTest.java | 2 +-
.../org/alfresco/repo/imap/LoadTester.java | 2 +-
.../repo/importer/FileImporterTest.java | 14 +-
.../org/alfresco/repo/jscript/PeopleTest.java | 14 +-
.../lock/mem/AbstractLockStoreTxTest.java | 128 +--
.../filefolder/FileFolderServiceImplTest.java | 6 +-
.../HiddenAspectCmisConfigTest.java | 54 +-
.../model/filefolder/HiddenAspectTest.java | 10 +-
.../repo/model/ml/tools/LanguagesTest.java | 6 +-
.../alfresco/repo/module/ComponentsTest.java | 4 +-
.../node/ConcurrentNodeServiceSearchTest.java | 4 +-
.../node/archive/ArchiveAndRestoreTest.java | 58 +-
.../cleanup/DeletedNodeBatchCleanupTest.java | 4 +-
.../node/cleanup/TransactionCleanupTest.java | 4 +-
.../db/DbNodeServiceImplPropagationTest.java | 4 +-
.../repo/node/db/DbNodeServiceImplTest.java | 4 +-
.../integrity/IncompleteNodeTaggerTest.java | 4 +-
.../repo/node/integrity/IntegrityTest.java | 4 +-
.../repo/ownable/impl/OwnableServiceTest.java | 34 +-
.../PolicyComponentTransactionTest.java | 54 +-
.../ReplicationServiceIntegrationTest.java | 4 +-
.../repo/rule/RuleServiceCoverageTest.java | 2 +-
.../repo/rule/RuleServiceImplTest.java | 4 +-
.../repo/search/SearchServiceTest.java | 4 +-
.../repo/search/SearcherComponentTest.java | 6 +-
.../impl/querymodel/impl/db/DBQueryTest.java | 6 +-
.../authentication/AuthenticationTest.java | 6 +-
.../UpgradePasswordHashTest.java | 54 +-
.../authority/AuthorityServiceTest.java | 6 +-
.../script/ScriptAuthorityServiceTest.java | 6 +-
.../LockOwnerDynamicAuthorityTest.java | 54 +-
.../impl/AbstractPermissionTest.java | 4 +-
.../impl/AbstractReadPermissionTest.java | 4 +-
.../permissions/impl/AclDaoComponentTest.java | 16 +-
.../HomeFolderProviderSynchronizerTest.java | 54 +-
.../repo/security/person/PersonTest.java | 4 +-
.../repo/site/SiteServiceTestHuge.java | 6 +-
.../SubscriptionServiceImplTest.java | 6 +-
.../UpdateTagScopesActionExecuterTest.java | 6 +-
.../AlfrescoTransactionSupportTest.java | 4 +-
.../ConnectionPoolOverloadTest.java | 4 +-
.../RetryingTransactionHelperTest.java | 6 +-
.../TransactionAwareSingletonTest.java | 4 +-
.../TransactionServiceImplTest.java | 8 +-
.../transfer/TransferServiceCallbackTest.java | 6 +-
.../repo/usage/RepoUsageComponentTest.java | 4 +-
.../alfresco/repo/usage/UserUsageTest.java | 76 +-
.../usage/UserUsageTrackingComponentTest.java | 54 +-
.../repo/version/VersionServiceImplTest.java | 4 +-
.../VirtualizationIntegrationTest.java | 4 +-
113 files changed, 1381 insertions(+), 1380 deletions(-)
diff --git a/amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java b/amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java
index 7e0f1bcc63..9deb18b3d1 100644
--- a/amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java
+++ b/amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java
@@ -52,7 +52,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
-import javax.transaction.SystemException;
+import jakarta.transaction.SystemException;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
diff --git a/amps/share-services/src/test/java/org/alfresco/repo/web/scripts/wiki/WikiRestApiTest.java b/amps/share-services/src/test/java/org/alfresco/repo/web/scripts/wiki/WikiRestApiTest.java
index abf39ca381..60733b3dab 100644
--- a/amps/share-services/src/test/java/org/alfresco/repo/web/scripts/wiki/WikiRestApiTest.java
+++ b/amps/share-services/src/test/java/org/alfresco/repo/web/scripts/wiki/WikiRestApiTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 - 2020 Alfresco Software Limited.
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
@@ -24,7 +24,7 @@ import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.node.archive.NodeArchiveService;
diff --git a/amps/share-services/src/test/java/org/alfresco/slingshot/documentlibrary/FolderTemplateTest.java b/amps/share-services/src/test/java/org/alfresco/slingshot/documentlibrary/FolderTemplateTest.java
index 546b384eb8..98e4c16eb6 100644
--- a/amps/share-services/src/test/java/org/alfresco/slingshot/documentlibrary/FolderTemplateTest.java
+++ b/amps/share-services/src/test/java/org/alfresco/slingshot/documentlibrary/FolderTemplateTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 - 2021 Alfresco Software Limited.
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
@@ -24,7 +24,7 @@ import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.model.Repository;
diff --git a/core/src/main/java/org/alfresco/util/transaction/SpringAwareUserTransaction.java b/core/src/main/java/org/alfresco/util/transaction/SpringAwareUserTransaction.java
index 476890ecf5..dd22769b7c 100644
--- a/core/src/main/java/org/alfresco/util/transaction/SpringAwareUserTransaction.java
+++ b/core/src/main/java/org/alfresco/util/transaction/SpringAwareUserTransaction.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2014 Alfresco Software Limited.
+ * Copyright (C) 2005-2023 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -23,13 +23,13 @@ import static java.util.Collections.emptyList;
import java.lang.reflect.Method;
import java.util.Collection;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.HeuristicMixedException;
+import jakarta.transaction.HeuristicRollbackException;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.Status;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.StackTraceUtil;
import org.alfresco.util.GUID;
diff --git a/core/src/test/java/org/alfresco/util/transaction/SpringAwareUserTransactionTest.java b/core/src/test/java/org/alfresco/util/transaction/SpringAwareUserTransactionTest.java
index 2b11281c5d..00855942f8 100644
--- a/core/src/test/java/org/alfresco/util/transaction/SpringAwareUserTransactionTest.java
+++ b/core/src/test/java/org/alfresco/util/transaction/SpringAwareUserTransactionTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2014 Alfresco Software Limited.
+ * Copyright (C) 2005-2023 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -21,9 +21,9 @@ package org.alfresco.util.transaction;
import java.util.NoSuchElementException;
import java.util.Objects;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/pom.xml b/pom.xml
index 90d27f0bf1..acd30027fe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,7 +105,7 @@
3.0.1
2.0.1
2.1.1
- 1.3.3
+ 2.0.1
3.0.0
2.0.1
2.0.1
@@ -117,7 +117,7 @@
1.1.4
3.4.2-A5
- 1.6.2-A1
+ 1.6.2-A2
23.1.0-A1
2.2.0
@@ -1114,6 +1114,7 @@
javax.xml.soap:saaj-api
javax.xml.ws:jaxws-api
javax.mail
+ javax.transaction
jakarta.servlet:jakarta.servlet-api:(, 5.0.0)
@@ -1121,7 +1122,7 @@
jakarta.json:jakarta.json-api:(, 2.0.1)
jakarta.servlet.jsp:jakarta.servlet.jsp-api:(, 3.0.0)
jakarta.annotation:jakarta.annotation-api:(, 2.0.0)
-
+ jakarta.transaction:jakarta.transaction-api:(, 2.0.1)
jakarta.jms:jakarta.jms-api:(, 3.0.0)
jakarta.activation:jakarta.activation-api:(, 2.0.1)
jakarta.xml.ws:jakarta.xml.ws-api:(, 3.0.1)
@@ -1158,4 +1159,4 @@
-
+
\ No newline at end of file
diff --git a/remote-api/src/main/java/org/alfresco/repo/web/scripts/RepositoryContainer.java b/remote-api/src/main/java/org/alfresco/repo/web/scripts/RepositoryContainer.java
index 18e0e72d35..308ee1c054 100644
--- a/remote-api/src/main/java/org/alfresco/repo/web/scripts/RepositoryContainer.java
+++ b/remote-api/src/main/java/org/alfresco/repo/web/scripts/RepositoryContainer.java
@@ -34,8 +34,8 @@ import java.util.Objects;
import java.util.function.Supplier;
import jakarta.servlet.http.HttpServletResponse;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.error.ExceptionStackUtil;
diff --git a/remote-api/src/main/java/org/alfresco/repo/web/scripts/person/UserCSVUploadPost.java b/remote-api/src/main/java/org/alfresco/repo/web/scripts/person/UserCSVUploadPost.java
index 91ebb70580..dbc73ca72e 100644
--- a/remote-api/src/main/java/org/alfresco/repo/web/scripts/person/UserCSVUploadPost.java
+++ b/remote-api/src/main/java/org/alfresco/repo/web/scripts/person/UserCSVUploadPost.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -37,7 +37,7 @@ import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.person.PersonServiceImpl;
@@ -233,7 +233,7 @@ public class UserCSVUploadPost extends DeclarativeWebScript
{
// Make sure we rollback from this
UserTransaction userTrx = RetryingTransactionHelper.getActiveUserTransaction();
- if (userTrx != null && userTrx.getStatus() != javax.transaction.Status.STATUS_MARKED_ROLLBACK)
+ if (userTrx != null && userTrx.getStatus() != jakarta.transaction.Status.STATUS_MARKED_ROLLBACK)
{
try
{
diff --git a/remote-api/src/main/java/org/alfresco/repo/webdav/WebDAVServlet.java b/remote-api/src/main/java/org/alfresco/repo/webdav/WebDAVServlet.java
index 45d3657a51..26cd59929b 100644
--- a/remote-api/src/main/java/org/alfresco/repo/webdav/WebDAVServlet.java
+++ b/remote-api/src/main/java/org/alfresco/repo/webdav/WebDAVServlet.java
@@ -34,7 +34,7 @@ import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.repo.cache.SimpleCache;
import org.alfresco.repo.security.authentication.AuthenticationContext;
diff --git a/remote-api/src/main/java/org/alfresco/repo/webdav/auth/BaseSSOAuthenticationFilter.java b/remote-api/src/main/java/org/alfresco/repo/webdav/auth/BaseSSOAuthenticationFilter.java
index 4cb2864fdd..d207c17339 100644
--- a/remote-api/src/main/java/org/alfresco/repo/webdav/auth/BaseSSOAuthenticationFilter.java
+++ b/remote-api/src/main/java/org/alfresco/repo/webdav/auth/BaseSSOAuthenticationFilter.java
@@ -39,7 +39,7 @@ import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.filesys.ExtendedServerConfigurationAccessor;
diff --git a/remote-api/src/test/java/org/alfresco/repo/web/scripts/action/RunningActionRestApiTest.java b/remote-api/src/test/java/org/alfresco/repo/web/scripts/action/RunningActionRestApiTest.java
index f94d537fee..e8b73df480 100644
--- a/remote-api/src/test/java/org/alfresco/repo/web/scripts/action/RunningActionRestApiTest.java
+++ b/remote-api/src/test/java/org/alfresco/repo/web/scripts/action/RunningActionRestApiTest.java
@@ -1,33 +1,33 @@
-/*
- * #%L
- * Alfresco Remote API
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Remote API
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.web.scripts.action;
import java.util.List;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.ActionImpl;
diff --git a/remote-api/src/test/java/org/alfresco/repo/web/scripts/comment/CommentsApiTest.java b/remote-api/src/test/java/org/alfresco/repo/web/scripts/comment/CommentsApiTest.java
index 31fcbdd8b5..371cb98c66 100644
--- a/remote-api/src/test/java/org/alfresco/repo/web/scripts/comment/CommentsApiTest.java
+++ b/remote-api/src/test/java/org/alfresco/repo/web/scripts/comment/CommentsApiTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -30,7 +30,7 @@ import java.text.MessageFormat;
import java.util.Date;
import java.util.List;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
diff --git a/remote-api/src/test/java/org/alfresco/repo/web/scripts/discussion/DiscussionRestApiTest.java b/remote-api/src/test/java/org/alfresco/repo/web/scripts/discussion/DiscussionRestApiTest.java
index 2a178643fb..cb7fddc4b2 100644
--- a/remote-api/src/test/java/org/alfresco/repo/web/scripts/discussion/DiscussionRestApiTest.java
+++ b/remote-api/src/test/java/org/alfresco/repo/web/scripts/discussion/DiscussionRestApiTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -32,7 +32,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.model.ForumModel;
diff --git a/remote-api/src/test/java/org/alfresco/repo/web/scripts/links/LinksRestApiTest.java b/remote-api/src/test/java/org/alfresco/repo/web/scripts/links/LinksRestApiTest.java
index 27542d6878..a021572388 100644
--- a/remote-api/src/test/java/org/alfresco/repo/web/scripts/links/LinksRestApiTest.java
+++ b/remote-api/src/test/java/org/alfresco/repo/web/scripts/links/LinksRestApiTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -31,7 +31,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.activities.feed.FeedGenerator;
diff --git a/remote-api/src/test/java/org/alfresco/repo/web/scripts/replication/ReplicationRestApiTest.java b/remote-api/src/test/java/org/alfresco/repo/web/scripts/replication/ReplicationRestApiTest.java
index a0077c7b3c..70a83e719e 100644
--- a/remote-api/src/test/java/org/alfresco/repo/web/scripts/replication/ReplicationRestApiTest.java
+++ b/remote-api/src/test/java/org/alfresco/repo/web/scripts/replication/ReplicationRestApiTest.java
@@ -1,31 +1,31 @@
-/*
- * #%L
- * Alfresco Remote API
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Remote API
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.web.scripts.replication;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.ActionImpl;
diff --git a/remote-api/src/test/java/org/alfresco/repo/webdav/DeleteMethodTest.java b/remote-api/src/test/java/org/alfresco/repo/webdav/DeleteMethodTest.java
index da83047f9f..6e73d73ebc 100644
--- a/remote-api/src/test/java/org/alfresco/repo/webdav/DeleteMethodTest.java
+++ b/remote-api/src/test/java/org/alfresco/repo/webdav/DeleteMethodTest.java
@@ -35,8 +35,8 @@ import java.util.HashMap;
import java.util.Map;
import jakarta.servlet.http.HttpServletResponse;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.model.Repository;
diff --git a/remote-api/src/test/java/org/alfresco/repo/webdav/GetMethodRegressionTest.java b/remote-api/src/test/java/org/alfresco/repo/webdav/GetMethodRegressionTest.java
index 71ccdbc37c..dbce6bebbc 100644
--- a/remote-api/src/test/java/org/alfresco/repo/webdav/GetMethodRegressionTest.java
+++ b/remote-api/src/test/java/org/alfresco/repo/webdav/GetMethodRegressionTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -29,8 +29,8 @@ import java.io.Serializable;
import java.net.HttpURLConnection;
import java.util.Map;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/remote-api/src/test/java/org/alfresco/repo/webdav/PutMethodTest.java b/remote-api/src/test/java/org/alfresco/repo/webdav/PutMethodTest.java
index 2c029619c5..248a7d3ba9 100644
--- a/remote-api/src/test/java/org/alfresco/repo/webdav/PutMethodTest.java
+++ b/remote-api/src/test/java/org/alfresco/repo/webdav/PutMethodTest.java
@@ -69,8 +69,8 @@ import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import java.io.InputStream;
import java.io.Serializable;
diff --git a/remote-api/src/test/java/org/alfresco/repo/webdav/WebDAVonContentUpdateTest.java b/remote-api/src/test/java/org/alfresco/repo/webdav/WebDAVonContentUpdateTest.java
index df600f1c42..1dd8f71847 100644
--- a/remote-api/src/test/java/org/alfresco/repo/webdav/WebDAVonContentUpdateTest.java
+++ b/remote-api/src/test/java/org/alfresco/repo/webdav/WebDAVonContentUpdateTest.java
@@ -36,7 +36,7 @@ import java.util.List;
import java.util.Map;
import jakarta.servlet.http.HttpServletResponse;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.ContentServicePolicies.OnContentUpdatePolicy;
diff --git a/remote-api/src/test/java/org/alfresco/rest/api/tests/QueriesPeopleApiTest.java b/remote-api/src/test/java/org/alfresco/rest/api/tests/QueriesPeopleApiTest.java
index 6a1932e6ac..b7ba226948 100644
--- a/remote-api/src/test/java/org/alfresco/rest/api/tests/QueriesPeopleApiTest.java
+++ b/remote-api/src/test/java/org/alfresco/rest/api/tests/QueriesPeopleApiTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
- * Copyright (C) 2005 - 2017 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -39,11 +39,11 @@ import java.util.List;
import java.util.Map;
import java.util.StringJoiner;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.SystemException;
+import jakarta.transaction.HeuristicMixedException;
+import jakarta.transaction.HeuristicRollbackException;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.SystemException;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.rest.AbstractSingleNetworkSiteTest;
diff --git a/remote-api/src/test/java/org/alfresco/rest/test/workflow/api/impl/ProcessesImplTest.java b/remote-api/src/test/java/org/alfresco/rest/test/workflow/api/impl/ProcessesImplTest.java
index 1efabb3c2b..bc6e8a37de 100644
--- a/remote-api/src/test/java/org/alfresco/rest/test/workflow/api/impl/ProcessesImplTest.java
+++ b/remote-api/src/test/java/org/alfresco/rest/test/workflow/api/impl/ProcessesImplTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -31,8 +31,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.workflow.WorkflowModel;
diff --git a/repository/src/main/java/org/alfresco/filesys/alfresco/AlfrescoTxDiskDriver.java b/repository/src/main/java/org/alfresco/filesys/alfresco/AlfrescoTxDiskDriver.java
index 0d432e69cf..7d37cbe9c3 100644
--- a/repository/src/main/java/org/alfresco/filesys/alfresco/AlfrescoTxDiskDriver.java
+++ b/repository/src/main/java/org/alfresco/filesys/alfresco/AlfrescoTxDiskDriver.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -29,8 +29,8 @@ package org.alfresco.filesys.alfresco;
import java.io.IOException;
import java.util.concurrent.Callable;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.jlan.server.SrvSession;
diff --git a/repository/src/main/java/org/alfresco/filesys/alfresco/FilesysTransaction.java b/repository/src/main/java/org/alfresco/filesys/alfresco/FilesysTransaction.java
index 82a76f0db4..1580a617e3 100644
--- a/repository/src/main/java/org/alfresco/filesys/alfresco/FilesysTransaction.java
+++ b/repository/src/main/java/org/alfresco/filesys/alfresco/FilesysTransaction.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -25,7 +25,7 @@
*/
package org.alfresco.filesys.alfresco;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
/**
diff --git a/repository/src/main/java/org/alfresco/filesys/auth/ftp/AlfrescoFtpAuthenticator.java b/repository/src/main/java/org/alfresco/filesys/auth/ftp/AlfrescoFtpAuthenticator.java
index 415ba41d94..bb2f6e7c4b 100644
--- a/repository/src/main/java/org/alfresco/filesys/auth/ftp/AlfrescoFtpAuthenticator.java
+++ b/repository/src/main/java/org/alfresco/filesys/auth/ftp/AlfrescoFtpAuthenticator.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -25,9 +25,9 @@
*/
package org.alfresco.filesys.auth.ftp;
-import javax.transaction.Status;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.UserTransaction;
import org.alfresco.filesys.alfresco.AlfrescoClientInfo;
import org.alfresco.jlan.ftp.FTPSrvSession;
diff --git a/repository/src/main/java/org/alfresco/filesys/auth/ftp/FTPAuthenticatorBase.java b/repository/src/main/java/org/alfresco/filesys/auth/ftp/FTPAuthenticatorBase.java
index 01e6be6672..849d37c77e 100644
--- a/repository/src/main/java/org/alfresco/filesys/auth/ftp/FTPAuthenticatorBase.java
+++ b/repository/src/main/java/org/alfresco/filesys/auth/ftp/FTPAuthenticatorBase.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -26,7 +26,7 @@
package org.alfresco.filesys.auth.ftp;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.springframework.extensions.config.ConfigElement;
import org.alfresco.filesys.AlfrescoConfigSection;
diff --git a/repository/src/main/java/org/alfresco/filesys/repo/ContentDiskDriver.java b/repository/src/main/java/org/alfresco/filesys/repo/ContentDiskDriver.java
index d2c3804a38..8555d67dad 100644
--- a/repository/src/main/java/org/alfresco/filesys/repo/ContentDiskDriver.java
+++ b/repository/src/main/java/org/alfresco/filesys/repo/ContentDiskDriver.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -41,7 +41,7 @@ import java.util.TreeSet;
import java.util.concurrent.Callable;
import java.util.regex.Pattern;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.filesys.alfresco.AlfrescoContext;
diff --git a/repository/src/main/java/org/alfresco/repo/importer/ExportSourceImporter.java b/repository/src/main/java/org/alfresco/repo/importer/ExportSourceImporter.java
index 2eea61b292..9bd560ae08 100644
--- a/repository/src/main/java/org/alfresco/repo/importer/ExportSourceImporter.java
+++ b/repository/src/main/java/org/alfresco/repo/importer/ExportSourceImporter.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -37,7 +37,7 @@ import java.io.Writer;
import java.util.List;
import java.util.Set;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.repo.cache.SimpleCache;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
diff --git a/repository/src/main/java/org/alfresco/repo/importer/FileSourceImporter.java b/repository/src/main/java/org/alfresco/repo/importer/FileSourceImporter.java
index 09d33e9434..3aa52f153d 100644
--- a/repository/src/main/java/org/alfresco/repo/importer/FileSourceImporter.java
+++ b/repository/src/main/java/org/alfresco/repo/importer/FileSourceImporter.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -31,7 +31,7 @@ import java.io.Reader;
import java.util.List;
import java.util.Set;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.repo.cache.SimpleCache;
import org.alfresco.repo.security.authentication.AuthenticationContext;
diff --git a/repository/src/main/java/org/alfresco/repo/importer/system/SystemInfoBootstrap.java b/repository/src/main/java/org/alfresco/repo/importer/system/SystemInfoBootstrap.java
index 3e5a9f888c..7f27c5fce1 100644
--- a/repository/src/main/java/org/alfresco/repo/importer/system/SystemInfoBootstrap.java
+++ b/repository/src/main/java/org/alfresco/repo/importer/system/SystemInfoBootstrap.java
@@ -1,34 +1,34 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.importer.system;
import java.io.InputStream;
import java.util.List;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.security.authentication.AuthenticationContext;
diff --git a/repository/src/main/java/org/alfresco/repo/search/transaction/SimpleTransaction.java b/repository/src/main/java/org/alfresco/repo/search/transaction/SimpleTransaction.java
index 092759e559..266acaceff 100644
--- a/repository/src/main/java/org/alfresco/repo/search/transaction/SimpleTransaction.java
+++ b/repository/src/main/java/org/alfresco/repo/search/transaction/SimpleTransaction.java
@@ -1,38 +1,38 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.search.transaction;
import java.io.UnsupportedEncodingException;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
+import jakarta.transaction.HeuristicMixedException;
+import jakarta.transaction.HeuristicRollbackException;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.Synchronization;
+import jakarta.transaction.SystemException;
import javax.transaction.xa.XAResource;
import org.alfresco.util.GUID;
diff --git a/repository/src/main/java/org/alfresco/repo/search/transaction/SimpleTransactionManager.java b/repository/src/main/java/org/alfresco/repo/search/transaction/SimpleTransactionManager.java
index ab13f5a016..8c39e56d0f 100644
--- a/repository/src/main/java/org/alfresco/repo/search/transaction/SimpleTransactionManager.java
+++ b/repository/src/main/java/org/alfresco/repo/search/transaction/SimpleTransactionManager.java
@@ -1,38 +1,38 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.search.transaction;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.InvalidTransactionException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.SystemException;
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
+import jakarta.transaction.HeuristicMixedException;
+import jakarta.transaction.HeuristicRollbackException;
+import jakarta.transaction.InvalidTransactionException;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.Transaction;
+import jakarta.transaction.TransactionManager;
public class SimpleTransactionManager implements TransactionManager
{
diff --git a/repository/src/main/java/org/alfresco/repo/search/transaction/XidTransaction.java b/repository/src/main/java/org/alfresco/repo/search/transaction/XidTransaction.java
index 8618d3b391..df0b8f033e 100644
--- a/repository/src/main/java/org/alfresco/repo/search/transaction/XidTransaction.java
+++ b/repository/src/main/java/org/alfresco/repo/search/transaction/XidTransaction.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -23,12 +23,12 @@
* along with Alfresco. If not, see .
* #L%
*/
-package org.alfresco.repo.search.transaction;
-
-import javax.transaction.Transaction;
-import javax.transaction.xa.Xid;
-
-public interface XidTransaction extends Xid, Transaction
-{
-
-}
+package org.alfresco.repo.search.transaction;
+
+import jakarta.transaction.Transaction;
+import javax.transaction.xa.Xid;
+
+public interface XidTransaction extends Xid, Transaction
+{
+
+}
diff --git a/repository/src/main/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java b/repository/src/main/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java
index 12eb1ca2a3..23b4bc9dce 100644
--- a/repository/src/main/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java
+++ b/repository/src/main/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.tenant;
import java.io.File;
@@ -34,7 +34,7 @@ import java.util.List;
import java.util.Properties;
import java.util.regex.Pattern;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import net.sf.acegisecurity.providers.encoding.PasswordEncoder;
diff --git a/repository/src/main/java/org/alfresco/repo/transaction/DummyTransactionService.java b/repository/src/main/java/org/alfresco/repo/transaction/DummyTransactionService.java
index 75b06adee7..88d1cc21aa 100644
--- a/repository/src/main/java/org/alfresco/repo/transaction/DummyTransactionService.java
+++ b/repository/src/main/java/org/alfresco/repo/transaction/DummyTransactionService.java
@@ -1,32 +1,32 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.transaction;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.service.transaction.TransactionService;
diff --git a/repository/src/main/java/org/alfresco/repo/transaction/RetryingTransactionHelper.java b/repository/src/main/java/org/alfresco/repo/transaction/RetryingTransactionHelper.java
index 4a4c4d950e..e6f518112b 100644
--- a/repository/src/main/java/org/alfresco/repo/transaction/RetryingTransactionHelper.java
+++ b/repository/src/main/java/org/alfresco/repo/transaction/RetryingTransactionHelper.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -37,9 +37,9 @@ import java.util.Random;
import java.util.SortedMap;
import java.util.TreeMap;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.error.AlfrescoRuntimeException;
diff --git a/repository/src/main/java/org/alfresco/repo/transaction/TransactionServiceImpl.java b/repository/src/main/java/org/alfresco/repo/transaction/TransactionServiceImpl.java
index f76b1deda7..18407bb13d 100644
--- a/repository/src/main/java/org/alfresco/repo/transaction/TransactionServiceImpl.java
+++ b/repository/src/main/java/org/alfresco/repo/transaction/TransactionServiceImpl.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.transaction;
import java.util.HashSet;
@@ -31,7 +31,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.namespace.NamespaceService;
diff --git a/repository/src/main/java/org/alfresco/repo/transaction/TransactionUtil.java b/repository/src/main/java/org/alfresco/repo/transaction/TransactionUtil.java
index 16d8210e9c..d51afb909b 100644
--- a/repository/src/main/java/org/alfresco/repo/transaction/TransactionUtil.java
+++ b/repository/src/main/java/org/alfresco/repo/transaction/TransactionUtil.java
@@ -1,33 +1,33 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.transaction;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.service.transaction.TransactionService;
diff --git a/repository/src/main/java/org/alfresco/repo/transfer/AbstractManifestProcessorBase.java b/repository/src/main/java/org/alfresco/repo/transfer/AbstractManifestProcessorBase.java
index 637c3c14bb..69a4038b66 100644
--- a/repository/src/main/java/org/alfresco/repo/transfer/AbstractManifestProcessorBase.java
+++ b/repository/src/main/java/org/alfresco/repo/transfer/AbstractManifestProcessorBase.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.transfer;
import java.io.File;
@@ -30,7 +30,7 @@ import java.io.Serializable;
import java.util.List;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
diff --git a/repository/src/main/java/org/alfresco/repo/transfer/TransferServiceImpl2.java b/repository/src/main/java/org/alfresco/repo/transfer/TransferServiceImpl2.java
index d88b23a0fd..57a235f696 100644
--- a/repository/src/main/java/org/alfresco/repo/transfer/TransferServiceImpl2.java
+++ b/repository/src/main/java/org/alfresco/repo/transfer/TransferServiceImpl2.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.transfer;
import java.io.BufferedReader;
@@ -48,7 +48,7 @@ import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
diff --git a/repository/src/main/java/org/alfresco/repo/workflow/WorkflowDeployer.java b/repository/src/main/java/org/alfresco/repo/workflow/WorkflowDeployer.java
index dc4e057e6c..3941e72229 100644
--- a/repository/src/main/java/org/alfresco/repo/workflow/WorkflowDeployer.java
+++ b/repository/src/main/java/org/alfresco/repo/workflow/WorkflowDeployer.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2022 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -62,7 +62,7 @@ import org.springframework.context.ApplicationEvent;
import org.springframework.core.io.ClassPathResource;
import org.springframework.extensions.surf.util.AbstractLifecycleBean;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import java.io.InputStream;
import java.io.Serializable;
import java.util.ArrayList;
diff --git a/repository/src/main/java/org/alfresco/service/transaction/TransactionService.java b/repository/src/main/java/org/alfresco/service/transaction/TransactionService.java
index 274e0e5ed5..d598370bd9 100644
--- a/repository/src/main/java/org/alfresco/service/transaction/TransactionService.java
+++ b/repository/src/main/java/org/alfresco/service/transaction/TransactionService.java
@@ -1,31 +1,31 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.service.transaction;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.service.NotAuditable;
@@ -33,9 +33,9 @@ import org.alfresco.service.NotAuditable;
/**
* Contract for retrieving access to a user transaction.
*
- * Note that the implementation of the javax.transaction.UserTransaction
+ * Note that the implementation of the jakarta.transaction.UserTransaction
* is not able to provide the full set of status codes available on the
- * javax.transaction.Status
class.
+ * jakarta.transaction.Status
class.
*
* @author David Caruana
*/
diff --git a/repository/src/test/java/org/alfresco/encryption/EncryptionTests.java b/repository/src/test/java/org/alfresco/encryption/EncryptionTests.java
index c4baa97db7..bfb095409f 100644
--- a/repository/src/test/java/org/alfresco/encryption/EncryptionTests.java
+++ b/repository/src/test/java/org/alfresco/encryption/EncryptionTests.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2021 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -40,7 +40,7 @@ import java.util.Map;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESedeKeySpec;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/encryption/KeyStoreTests.java b/repository/src/test/java/org/alfresco/encryption/KeyStoreTests.java
index 76ec78f963..9bb6d6c12d 100644
--- a/repository/src/test/java/org/alfresco/encryption/KeyStoreTests.java
+++ b/repository/src/test/java/org/alfresco/encryption/KeyStoreTests.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -45,9 +45,9 @@ import java.util.Properties;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESedeKeySpec;
-import javax.transaction.NotSupportedException;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.UserTransaction;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.transaction.TransactionService;
diff --git a/repository/src/test/java/org/alfresco/filesys/repo/ContentDiskDriverTest.java b/repository/src/test/java/org/alfresco/filesys/repo/ContentDiskDriverTest.java
index 9b5617fba9..85c0bb875b 100644
--- a/repository/src/test/java/org/alfresco/filesys/repo/ContentDiskDriverTest.java
+++ b/repository/src/test/java/org/alfresco/filesys/repo/ContentDiskDriverTest.java
@@ -38,7 +38,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/opencmis/BaseCMISTest.java b/repository/src/test/java/org/alfresco/opencmis/BaseCMISTest.java
index abe2adc6c6..0006c7947f 100644
--- a/repository/src/test/java/org/alfresco/opencmis/BaseCMISTest.java
+++ b/repository/src/test/java/org/alfresco/opencmis/BaseCMISTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -27,8 +27,8 @@ package org.alfresco.opencmis;
import java.util.Date;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.opencmis.dictionary.CMISDictionaryService;
import org.alfresco.opencmis.mapping.CMISMapping;
diff --git a/repository/src/test/java/org/alfresco/repo/action/ActionTrackingServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/action/ActionTrackingServiceImplTest.java
index 1b7124c7a1..a7c0d22d13 100644
--- a/repository/src/test/java/org/alfresco/repo/action/ActionTrackingServiceImplTest.java
+++ b/repository/src/test/java/org/alfresco/repo/action/ActionTrackingServiceImplTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -23,8 +23,8 @@
* along with Alfresco. If not, see .
* #L%
*/
-package org.alfresco.repo.action;
-
+package org.alfresco.repo.action;
+
import static org.alfresco.repo.action.ActionServiceImplTest.assertBefore;
import java.net.InetAddress;
@@ -32,7 +32,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.ActionServiceImplTest.CancellableSleepAction;
@@ -68,355 +68,355 @@ import org.alfresco.util.ApplicationContextHelper;
import org.junit.experimental.categories.Category;
import org.springframework.context.ConfigurableApplicationContext;
-import junit.framework.TestCase;
-
-/**
- * Action tracking service tests. These mostly need
- * careful control over the transactions they use.
- *
- * @author Nick Burch
- */
-@Category(OwnJVMTestsCategory.class)
-public class ActionTrackingServiceImplTest extends TestCase
-{
- private static ConfigurableApplicationContext ctx =
- (ConfigurableApplicationContext)ApplicationContextHelper.getApplicationContext();
-
- private StoreRef storeRef;
- private NodeRef rootNodeRef;
-
- private NodeRef nodeRef;
- @SuppressWarnings("unused")
- private NodeRef folder;
- private NodeService nodeService;
- private ActionService actionService;
- private ScriptService scriptService;
- private TransactionService transactionService;
- private RuntimeActionService runtimeActionService;
- private ActionTrackingService actionTrackingService;
- private SimpleCache executingActionsCache;
-
- private AsyncOccurs asyncOccurs;
-
- @Override
- @SuppressWarnings("unchecked")
+import junit.framework.TestCase;
+
+/**
+ * Action tracking service tests. These mostly need
+ * careful control over the transactions they use.
+ *
+ * @author Nick Burch
+ */
+@Category(OwnJVMTestsCategory.class)
+public class ActionTrackingServiceImplTest extends TestCase
+{
+ private static ConfigurableApplicationContext ctx =
+ (ConfigurableApplicationContext)ApplicationContextHelper.getApplicationContext();
+
+ private StoreRef storeRef;
+ private NodeRef rootNodeRef;
+
+ private NodeRef nodeRef;
+ @SuppressWarnings("unused")
+ private NodeRef folder;
+ private NodeService nodeService;
+ private ActionService actionService;
+ private ScriptService scriptService;
+ private TransactionService transactionService;
+ private RuntimeActionService runtimeActionService;
+ private ActionTrackingService actionTrackingService;
+ private SimpleCache executingActionsCache;
+
+ private AsyncOccurs asyncOccurs;
+
+ @Override
+ @SuppressWarnings("unchecked")
protected void setUp() throws Exception
- {
- // Detect any dangling transactions as there is a lot of direct UserTransaction manipulation
- if (AlfrescoTransactionSupport.getTransactionReadState() != TxnReadState.TXN_NONE)
- {
- throw new IllegalStateException(
- "There should not be any transactions when starting test: " +
- AlfrescoTransactionSupport.getTransactionId() + " started at " +
- new Date(AlfrescoTransactionSupport.getTransactionStartTime()));
- }
-
- // Grab our beans
- this.nodeService = (NodeService)ctx.getBean("nodeService");
- this.scriptService = (ScriptService)ctx.getBean("scriptService");
- this.actionService = (ActionService)ctx.getBean("actionService");
- this.runtimeActionService = (RuntimeActionService)ctx.getBean("actionService");
- this.actionTrackingService = (ActionTrackingService)ctx.getBean("actionTrackingService");
- this.transactionService = (TransactionService)ctx.getBean("transactionService");
- this.executingActionsCache = (SimpleCache)ctx.getBean("executingActionsCache");
-
- AuthenticationUtil.setRunAsUserSystem();
-
- UserTransaction txn = transactionService.getUserTransaction();
- txn.begin();
-
- // Where to put things
- this.storeRef = this.nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, "Test_" + System.currentTimeMillis());
- this.rootNodeRef = this.nodeService.getRootNode(this.storeRef);
-
- // Create the node used for tests
- this.nodeRef = this.nodeService.createNode(
- this.rootNodeRef,
- ContentModel.ASSOC_CHILDREN,
- QName.createQName("{test}testnode"),
- ContentModel.TYPE_CONTENT).getChildRef();
- this.nodeService.setProperty(
- this.nodeRef,
- ContentModel.PROP_CONTENT,
- new ContentData(null, MimetypeMap.MIMETYPE_TEXT_PLAIN, 0L, null));
- this.folder = this.nodeService.createNode(
- this.rootNodeRef,
- ContentModel.ASSOC_CHILDREN,
- QName.createQName("{test}testFolder"),
- ContentModel.TYPE_FOLDER).getChildRef();
-
- txn.commit();
-
- // Cache should start empty each time
- executingActionsCache.clear();
-
- // Reset the execution instance IDs, so we
- // can predict what they'll be
- ((ActionTrackingServiceImpl)actionTrackingService).resetNextExecutionId();
-
- // Register the test executor, if needed
- SleepActionExecuter.registerIfNeeded(ctx);
-
- // We want to know when async actions occur
- asyncOccurs = new AsyncOccurs();
- ((PolicyComponent)ctx.getBean("policyComponent")).bindClassBehaviour(
- AsynchronousActionExecutionQueuePolicies.OnAsyncActionExecute.QNAME,
- ActionModel.TYPE_ACTION,
- new JavaBehaviour(asyncOccurs, "onAsyncActionExecute", NotificationFrequency.EVERY_EVENT)
- );
- }
-
- /** Creating cache keys */
- public void testCreateCacheKeys() throws Exception
- {
- ActionImpl action = (ActionImpl)createWorkingSleepAction("1234");
- assertEquals("sleep-action", action.getActionDefinitionName());
- assertEquals("1234", action.getId());
- assertEquals(-1, action.getExecutionInstance());
-
- // Give it a predictable execution instance
- action.setExecutionInstance(1);
-
- // From an action
- String key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals("sleep-action=1234=1", key);
-
- // From an ExecutionSummary
- ExecutionSummary s = new ExecutionSummary("sleep-action", "1234", 1);
- key = ActionTrackingServiceImpl.generateCacheKey(s);
- assertEquals("sleep-action=1234=1", key);
- }
-
- /** Creating ExecutionDetails and ExecutionSummary */
- public void testExecutionDetailsSummary() throws Exception
- {
- // Create an action with a known execution instance
- Action action = createWorkingSleepAction("1234");
- ((ActionImpl)action).setExecutionInstance(1);
-
- // Create the ExecutionSummary from an action
- String key = ActionTrackingServiceImpl.generateCacheKey(action);
-
- ExecutionSummary s = ActionTrackingServiceImpl.buildExecutionSummary(action);
- assertEquals("sleep-action", s.getActionType());
- assertEquals("1234", s.getActionId());
- assertEquals(1, s.getExecutionInstance());
-
- // Create the ExecutionSummery from a key
- s = ActionTrackingServiceImpl.buildExecutionSummary(key);
- assertEquals("sleep-action", s.getActionType());
- assertEquals("1234", s.getActionId());
- assertEquals(1, s.getExecutionInstance());
-
- // Now create ExecutionDetails
- ExecutionDetails d = ActionTrackingServiceImpl.buildExecutionDetails(action);
- assertNotNull(d.getExecutionSummary());
- assertEquals("sleep-action", d.getActionType());
- assertEquals("1234", d.getActionId());
- assertEquals(1, d.getExecutionInstance());
- assertEquals(null, d.getPersistedActionRef());
- assertEquals(null, d.getStartedAt());
-
- // Check the machine details
- // Should be "IP : Name"
- InetAddress localhost = InetAddress.getLocalHost();
- String machineName = localhost.getHostAddress() + " : " +
- localhost.getHostName();
- assertEquals(machineName, d.getRunningOn());
- }
-
- /** Running an action gives it an execution ID */
- public void testExecutionInstanceAssignment() throws Exception
- {
- ActionImpl action = (ActionImpl)createWorkingSleepAction("1234");
- assertEquals(-1, action.getExecutionInstance());
-
- // Have it run, will get the ID of 1
- actionTrackingService.recordActionExecuting(action);
- assertEquals(1, action.getExecutionInstance());
-
- // And again, gets 2
- actionTrackingService.recordActionExecuting(action);
- assertEquals(2, action.getExecutionInstance());
-
- // And again, gets 3
- actionTrackingService.recordActionExecuting(action);
- assertEquals(3, action.getExecutionInstance());
- }
-
- /**
- * The correct things happen with the cache
- * when you mark things as working / failed / etc
- */
- public void testInOutCache() throws Exception
- {
- Action action = createWorkingSleepAction("1234");
- assertEquals(ActionStatus.New, action.getExecutionStatus());
-
- String key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(null, executingActionsCache.get(key));
-
-
- // Can complete or fail, won't be there
- actionTrackingService.recordActionComplete(action);
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Completed, action.getExecutionStatus());
- assertEquals(null, executingActionsCache.get(key));
-
- actionTrackingService.recordActionFailure(action, new Exception("Testing"));
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Failed, action.getExecutionStatus());
- assertEquals("Testing", action.getExecutionFailureMessage());
- assertEquals(null, executingActionsCache.get(key));
-
-
- // Pending will add it, but with no start date
- actionTrackingService.recordActionPending(action);
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Pending, action.getExecutionStatus());
- assertNotNull(null, executingActionsCache.get(key));
-
- ExecutionSummary s = ActionTrackingServiceImpl.buildExecutionSummary(action);
- ExecutionDetails d = actionTrackingService.getExecutionDetails(s);
- assertNotNull(d.getExecutionSummary());
- assertEquals("sleep-action", d.getActionType());
- assertEquals("1234", d.getActionId());
- assertEquals(1, d.getExecutionInstance());
- assertEquals(null, d.getPersistedActionRef());
- assertNull(null, d.getStartedAt());
-
-
- // Run it, will be updated in the cache
- actionTrackingService.recordActionExecuting(action);
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Running, action.getExecutionStatus());
- assertNotNull(null, executingActionsCache.get(key));
-
- s = ActionTrackingServiceImpl.buildExecutionSummary(action);
- d = actionTrackingService.getExecutionDetails(s);
- assertNotNull(d.getExecutionSummary());
- assertEquals("sleep-action", d.getActionType());
- assertEquals("1234", d.getActionId());
- assertEquals(1, d.getExecutionInstance());
- assertEquals(null, d.getPersistedActionRef());
- assertNotNull(null, d.getStartedAt());
-
-
- // Completion removes it
- actionTrackingService.recordActionComplete(action);
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Completed, action.getExecutionStatus());
- assertEquals(null, executingActionsCache.get(key));
-
- // Failure removes it
- actionTrackingService.recordActionExecuting(action);
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertNotNull(null, executingActionsCache.get(key));
-
- actionTrackingService.recordActionFailure(action, new Exception("Testing"));
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Failed, action.getExecutionStatus());
- assertEquals("Testing", action.getExecutionFailureMessage());
- assertEquals(null, executingActionsCache.get(key));
-
-
- // If run from new, i.e. not via pending, goes into the cache
- ((ActionImpl)action).setExecutionStatus(ActionStatus.New);
- ((ActionImpl)action).setExecutionStartDate(null);
- ((ActionImpl)action).setExecutionEndDate(null);
- ((ActionImpl)action).setExecutionFailureMessage(null);
- ((ActionImpl)action).setExecutionInstance(-1);
-
- actionTrackingService.recordActionExecuting(action);
- assertEquals(ActionStatus.Running, action.getExecutionStatus());
- assertTrue( ((ActionImpl)action).getExecutionInstance() != -1 );
-
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertNotNull(null, executingActionsCache.get(key));
-
- actionTrackingService.recordActionComplete(action);
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Completed, action.getExecutionStatus());
- assertEquals(null, executingActionsCache.get(key));
- }
-
- /** Working actions go into the cache, then out */
- public void testWorkingActions() throws Exception
- {
- final SleepActionExecuter sleepActionExec =
- (SleepActionExecuter)ctx.getBean(SleepActionExecuter.NAME);
- sleepActionExec.resetTimesExecuted();
- sleepActionExec.setSleepMs(10000);
-
- // Have it run asynchronously
- UserTransaction txn = transactionService.getUserTransaction();
- txn.begin();
- Action action = createWorkingSleepAction("54321");
- assertNull(action.getExecutionStartDate());
- assertNull(action.getExecutionEndDate());
- assertNull(action.getExecutionFailureMessage());
- assertEquals(ActionStatus.New, action.getExecutionStatus());
-
- String key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(null, executingActionsCache.get(key));
-
- this.actionService.executeAction(action, this.nodeRef, false, true);
-
-
- // End the transaction. Should allow the async action
- // to start up, and begin sleeping
- txn.commit();
- Thread.sleep(150);
-
- // The action should now be running
- // It will have got an execution instance id, so a new key
- key = ActionTrackingServiceImpl.generateCacheKey(action);
-
-
- // Check it's in the cache
- System.out.println("Checking the cache for " + key);
- assertNotNull(executingActionsCache.get(key));
-
- ExecutionSummary s = ActionTrackingServiceImpl.buildExecutionSummary(action);
- ExecutionDetails d = actionTrackingService.getExecutionDetails(s);
- assertNotNull(d.getExecutionSummary());
- assertEquals("sleep-action", d.getActionType());
- assertEquals("54321", d.getActionId());
- assertEquals(1, d.getExecutionInstance());
- assertEquals(null, d.getPersistedActionRef());
- assertNotNull(null, d.getStartedAt());
-
-
- // Tell it to stop sleeping
- // Then wait for it to finish
- asyncOccurs.awaitExecution(null, sleepActionExec.getExecutingThread(), action.getActionDefinitionName());
-
-
- // Ensure it went away again
- assertEquals(ActionStatus.Completed, action.getExecutionStatus());
- assertEquals(null, executingActionsCache.get(key));
-
- d = actionTrackingService.getExecutionDetails(s);
- assertEquals(null, d);
- }
-
- /** Failing actions go into the cache, then out */
- public void testFatallyFailingActions() throws Exception
- {
- Action failedAction = performFailingActionImpl(true, "54321");
-
- assertEquals(ActionStatus.Failed, failedAction.getExecutionStatus());
- assertEquals("Bang!", failedAction.getExecutionFailureMessage());
- }
-
- /** Failing actions go into the cache, then out */
- public void testTransientlyFailingActions() throws Exception
- {
- Action failedAction = performFailingActionImpl(false, "654321");
-
- assertEquals(ActionStatus.Declined, failedAction.getExecutionStatus());
- assertTrue(failedAction.getExecutionFailureMessage().endsWith("Pop!"));
- }
+ {
+ // Detect any dangling transactions as there is a lot of direct UserTransaction manipulation
+ if (AlfrescoTransactionSupport.getTransactionReadState() != TxnReadState.TXN_NONE)
+ {
+ throw new IllegalStateException(
+ "There should not be any transactions when starting test: " +
+ AlfrescoTransactionSupport.getTransactionId() + " started at " +
+ new Date(AlfrescoTransactionSupport.getTransactionStartTime()));
+ }
+
+ // Grab our beans
+ this.nodeService = (NodeService)ctx.getBean("nodeService");
+ this.scriptService = (ScriptService)ctx.getBean("scriptService");
+ this.actionService = (ActionService)ctx.getBean("actionService");
+ this.runtimeActionService = (RuntimeActionService)ctx.getBean("actionService");
+ this.actionTrackingService = (ActionTrackingService)ctx.getBean("actionTrackingService");
+ this.transactionService = (TransactionService)ctx.getBean("transactionService");
+ this.executingActionsCache = (SimpleCache)ctx.getBean("executingActionsCache");
+
+ AuthenticationUtil.setRunAsUserSystem();
+
+ UserTransaction txn = transactionService.getUserTransaction();
+ txn.begin();
+
+ // Where to put things
+ this.storeRef = this.nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, "Test_" + System.currentTimeMillis());
+ this.rootNodeRef = this.nodeService.getRootNode(this.storeRef);
+
+ // Create the node used for tests
+ this.nodeRef = this.nodeService.createNode(
+ this.rootNodeRef,
+ ContentModel.ASSOC_CHILDREN,
+ QName.createQName("{test}testnode"),
+ ContentModel.TYPE_CONTENT).getChildRef();
+ this.nodeService.setProperty(
+ this.nodeRef,
+ ContentModel.PROP_CONTENT,
+ new ContentData(null, MimetypeMap.MIMETYPE_TEXT_PLAIN, 0L, null));
+ this.folder = this.nodeService.createNode(
+ this.rootNodeRef,
+ ContentModel.ASSOC_CHILDREN,
+ QName.createQName("{test}testFolder"),
+ ContentModel.TYPE_FOLDER).getChildRef();
+
+ txn.commit();
+
+ // Cache should start empty each time
+ executingActionsCache.clear();
+
+ // Reset the execution instance IDs, so we
+ // can predict what they'll be
+ ((ActionTrackingServiceImpl)actionTrackingService).resetNextExecutionId();
+
+ // Register the test executor, if needed
+ SleepActionExecuter.registerIfNeeded(ctx);
+
+ // We want to know when async actions occur
+ asyncOccurs = new AsyncOccurs();
+ ((PolicyComponent)ctx.getBean("policyComponent")).bindClassBehaviour(
+ AsynchronousActionExecutionQueuePolicies.OnAsyncActionExecute.QNAME,
+ ActionModel.TYPE_ACTION,
+ new JavaBehaviour(asyncOccurs, "onAsyncActionExecute", NotificationFrequency.EVERY_EVENT)
+ );
+ }
+
+ /** Creating cache keys */
+ public void testCreateCacheKeys() throws Exception
+ {
+ ActionImpl action = (ActionImpl)createWorkingSleepAction("1234");
+ assertEquals("sleep-action", action.getActionDefinitionName());
+ assertEquals("1234", action.getId());
+ assertEquals(-1, action.getExecutionInstance());
+
+ // Give it a predictable execution instance
+ action.setExecutionInstance(1);
+
+ // From an action
+ String key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals("sleep-action=1234=1", key);
+
+ // From an ExecutionSummary
+ ExecutionSummary s = new ExecutionSummary("sleep-action", "1234", 1);
+ key = ActionTrackingServiceImpl.generateCacheKey(s);
+ assertEquals("sleep-action=1234=1", key);
+ }
+
+ /** Creating ExecutionDetails and ExecutionSummary */
+ public void testExecutionDetailsSummary() throws Exception
+ {
+ // Create an action with a known execution instance
+ Action action = createWorkingSleepAction("1234");
+ ((ActionImpl)action).setExecutionInstance(1);
+
+ // Create the ExecutionSummary from an action
+ String key = ActionTrackingServiceImpl.generateCacheKey(action);
+
+ ExecutionSummary s = ActionTrackingServiceImpl.buildExecutionSummary(action);
+ assertEquals("sleep-action", s.getActionType());
+ assertEquals("1234", s.getActionId());
+ assertEquals(1, s.getExecutionInstance());
+
+ // Create the ExecutionSummery from a key
+ s = ActionTrackingServiceImpl.buildExecutionSummary(key);
+ assertEquals("sleep-action", s.getActionType());
+ assertEquals("1234", s.getActionId());
+ assertEquals(1, s.getExecutionInstance());
+
+ // Now create ExecutionDetails
+ ExecutionDetails d = ActionTrackingServiceImpl.buildExecutionDetails(action);
+ assertNotNull(d.getExecutionSummary());
+ assertEquals("sleep-action", d.getActionType());
+ assertEquals("1234", d.getActionId());
+ assertEquals(1, d.getExecutionInstance());
+ assertEquals(null, d.getPersistedActionRef());
+ assertEquals(null, d.getStartedAt());
+
+ // Check the machine details
+ // Should be "IP : Name"
+ InetAddress localhost = InetAddress.getLocalHost();
+ String machineName = localhost.getHostAddress() + " : " +
+ localhost.getHostName();
+ assertEquals(machineName, d.getRunningOn());
+ }
+
+ /** Running an action gives it an execution ID */
+ public void testExecutionInstanceAssignment() throws Exception
+ {
+ ActionImpl action = (ActionImpl)createWorkingSleepAction("1234");
+ assertEquals(-1, action.getExecutionInstance());
+
+ // Have it run, will get the ID of 1
+ actionTrackingService.recordActionExecuting(action);
+ assertEquals(1, action.getExecutionInstance());
+
+ // And again, gets 2
+ actionTrackingService.recordActionExecuting(action);
+ assertEquals(2, action.getExecutionInstance());
+
+ // And again, gets 3
+ actionTrackingService.recordActionExecuting(action);
+ assertEquals(3, action.getExecutionInstance());
+ }
+
+ /**
+ * The correct things happen with the cache
+ * when you mark things as working / failed / etc
+ */
+ public void testInOutCache() throws Exception
+ {
+ Action action = createWorkingSleepAction("1234");
+ assertEquals(ActionStatus.New, action.getExecutionStatus());
+
+ String key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(null, executingActionsCache.get(key));
+
+
+ // Can complete or fail, won't be there
+ actionTrackingService.recordActionComplete(action);
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Completed, action.getExecutionStatus());
+ assertEquals(null, executingActionsCache.get(key));
+
+ actionTrackingService.recordActionFailure(action, new Exception("Testing"));
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Failed, action.getExecutionStatus());
+ assertEquals("Testing", action.getExecutionFailureMessage());
+ assertEquals(null, executingActionsCache.get(key));
+
+
+ // Pending will add it, but with no start date
+ actionTrackingService.recordActionPending(action);
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Pending, action.getExecutionStatus());
+ assertNotNull(null, executingActionsCache.get(key));
+
+ ExecutionSummary s = ActionTrackingServiceImpl.buildExecutionSummary(action);
+ ExecutionDetails d = actionTrackingService.getExecutionDetails(s);
+ assertNotNull(d.getExecutionSummary());
+ assertEquals("sleep-action", d.getActionType());
+ assertEquals("1234", d.getActionId());
+ assertEquals(1, d.getExecutionInstance());
+ assertEquals(null, d.getPersistedActionRef());
+ assertNull(null, d.getStartedAt());
+
+
+ // Run it, will be updated in the cache
+ actionTrackingService.recordActionExecuting(action);
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Running, action.getExecutionStatus());
+ assertNotNull(null, executingActionsCache.get(key));
+
+ s = ActionTrackingServiceImpl.buildExecutionSummary(action);
+ d = actionTrackingService.getExecutionDetails(s);
+ assertNotNull(d.getExecutionSummary());
+ assertEquals("sleep-action", d.getActionType());
+ assertEquals("1234", d.getActionId());
+ assertEquals(1, d.getExecutionInstance());
+ assertEquals(null, d.getPersistedActionRef());
+ assertNotNull(null, d.getStartedAt());
+
+
+ // Completion removes it
+ actionTrackingService.recordActionComplete(action);
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Completed, action.getExecutionStatus());
+ assertEquals(null, executingActionsCache.get(key));
+
+ // Failure removes it
+ actionTrackingService.recordActionExecuting(action);
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertNotNull(null, executingActionsCache.get(key));
+
+ actionTrackingService.recordActionFailure(action, new Exception("Testing"));
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Failed, action.getExecutionStatus());
+ assertEquals("Testing", action.getExecutionFailureMessage());
+ assertEquals(null, executingActionsCache.get(key));
+
+
+ // If run from new, i.e. not via pending, goes into the cache
+ ((ActionImpl)action).setExecutionStatus(ActionStatus.New);
+ ((ActionImpl)action).setExecutionStartDate(null);
+ ((ActionImpl)action).setExecutionEndDate(null);
+ ((ActionImpl)action).setExecutionFailureMessage(null);
+ ((ActionImpl)action).setExecutionInstance(-1);
+
+ actionTrackingService.recordActionExecuting(action);
+ assertEquals(ActionStatus.Running, action.getExecutionStatus());
+ assertTrue( ((ActionImpl)action).getExecutionInstance() != -1 );
+
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertNotNull(null, executingActionsCache.get(key));
+
+ actionTrackingService.recordActionComplete(action);
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Completed, action.getExecutionStatus());
+ assertEquals(null, executingActionsCache.get(key));
+ }
+
+ /** Working actions go into the cache, then out */
+ public void testWorkingActions() throws Exception
+ {
+ final SleepActionExecuter sleepActionExec =
+ (SleepActionExecuter)ctx.getBean(SleepActionExecuter.NAME);
+ sleepActionExec.resetTimesExecuted();
+ sleepActionExec.setSleepMs(10000);
+
+ // Have it run asynchronously
+ UserTransaction txn = transactionService.getUserTransaction();
+ txn.begin();
+ Action action = createWorkingSleepAction("54321");
+ assertNull(action.getExecutionStartDate());
+ assertNull(action.getExecutionEndDate());
+ assertNull(action.getExecutionFailureMessage());
+ assertEquals(ActionStatus.New, action.getExecutionStatus());
+
+ String key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(null, executingActionsCache.get(key));
+
+ this.actionService.executeAction(action, this.nodeRef, false, true);
+
+
+ // End the transaction. Should allow the async action
+ // to start up, and begin sleeping
+ txn.commit();
+ Thread.sleep(150);
+
+ // The action should now be running
+ // It will have got an execution instance id, so a new key
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+
+
+ // Check it's in the cache
+ System.out.println("Checking the cache for " + key);
+ assertNotNull(executingActionsCache.get(key));
+
+ ExecutionSummary s = ActionTrackingServiceImpl.buildExecutionSummary(action);
+ ExecutionDetails d = actionTrackingService.getExecutionDetails(s);
+ assertNotNull(d.getExecutionSummary());
+ assertEquals("sleep-action", d.getActionType());
+ assertEquals("54321", d.getActionId());
+ assertEquals(1, d.getExecutionInstance());
+ assertEquals(null, d.getPersistedActionRef());
+ assertNotNull(null, d.getStartedAt());
+
+
+ // Tell it to stop sleeping
+ // Then wait for it to finish
+ asyncOccurs.awaitExecution(null, sleepActionExec.getExecutingThread(), action.getActionDefinitionName());
+
+
+ // Ensure it went away again
+ assertEquals(ActionStatus.Completed, action.getExecutionStatus());
+ assertEquals(null, executingActionsCache.get(key));
+
+ d = actionTrackingService.getExecutionDetails(s);
+ assertEquals(null, d);
+ }
+
+ /** Failing actions go into the cache, then out */
+ public void testFatallyFailingActions() throws Exception
+ {
+ Action failedAction = performFailingActionImpl(true, "54321");
+
+ assertEquals(ActionStatus.Failed, failedAction.getExecutionStatus());
+ assertEquals("Bang!", failedAction.getExecutionFailureMessage());
+ }
+
+ /** Failing actions go into the cache, then out */
+ public void testTransientlyFailingActions() throws Exception
+ {
+ Action failedAction = performFailingActionImpl(false, "654321");
+
+ assertEquals(ActionStatus.Declined, failedAction.getExecutionStatus());
+ assertTrue(failedAction.getExecutionFailureMessage().endsWith("Pop!"));
+ }
private Action performFailingActionImpl(boolean fatalFailure, String actionId) throws Exception
{
@@ -492,86 +492,86 @@ public class ActionTrackingServiceImplTest extends TestCase
return action;
}
-
- /** Ensure that pending actions behave properly */
- public void testPendingActions() throws Exception
- {
- // New ones won't be in the cache
- Action action = createWorkingSleepAction("1234");
- assertEquals(ActionStatus.New, action.getExecutionStatus());
-
- String key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(null, executingActionsCache.get(key));
-
-
- // Ask for it to be pending, will go in
- actionTrackingService.recordActionPending(action);
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Pending, action.getExecutionStatus());
- assertNotNull(null, executingActionsCache.get(key));
-
- ExecutionSummary s = ActionTrackingServiceImpl.buildExecutionSummary(action);
- ExecutionDetails d = actionTrackingService.getExecutionDetails(s);
- assertNotNull(d.getExecutionSummary());
- assertEquals("sleep-action", d.getActionType());
- assertEquals("1234", d.getActionId());
- assertEquals(1, d.getExecutionInstance());
- assertEquals(null, d.getPersistedActionRef());
- assertNull(null, d.getStartedAt());
-
-
- // Run it, will stay
- actionTrackingService.recordActionExecuting(action);
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Running, action.getExecutionStatus());
- assertNotNull(null, executingActionsCache.get(key));
-
- s = ActionTrackingServiceImpl.buildExecutionSummary(action);
- d = actionTrackingService.getExecutionDetails(s);
- assertNotNull(d.getExecutionSummary());
- assertEquals("sleep-action", d.getActionType());
- assertEquals("1234", d.getActionId());
- assertEquals(1, d.getExecutionInstance());
- assertEquals(null, d.getPersistedActionRef());
- assertNotNull(d.getStartedAt());
-
-
- // Finish, goes
- actionTrackingService.recordActionComplete(action);
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Completed, action.getExecutionStatus());
- assertEquals(null, executingActionsCache.get(key));
-
-
- // Put another pending one in
- action = createWorkingSleepAction("1234");
- actionTrackingService.recordActionPending(action);
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Pending, action.getExecutionStatus());
- assertNotNull(null, executingActionsCache.get(key));
-
-
- // Remove it by hand
- executingActionsCache.remove(key);
- assertNull(null, executingActionsCache.get(key));
- int instanceId = ((ActionImpl)action).getExecutionInstance();
-
-
- // Run it, will go back in again, ID unchanged
- actionTrackingService.recordActionExecuting(action);
- assertEquals(key, ActionTrackingServiceImpl.generateCacheKey(action));
- assertEquals(instanceId, ((ActionImpl)action).getExecutionInstance());
-
- assertEquals(ActionStatus.Running, action.getExecutionStatus());
- assertNotNull(null, executingActionsCache.get(key));
-
-
- // Finish, will go again
- actionTrackingService.recordActionComplete(action);
- key = ActionTrackingServiceImpl.generateCacheKey(action);
- assertEquals(ActionStatus.Completed, action.getExecutionStatus());
- assertEquals(null, executingActionsCache.get(key));
- }
+
+ /** Ensure that pending actions behave properly */
+ public void testPendingActions() throws Exception
+ {
+ // New ones won't be in the cache
+ Action action = createWorkingSleepAction("1234");
+ assertEquals(ActionStatus.New, action.getExecutionStatus());
+
+ String key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(null, executingActionsCache.get(key));
+
+
+ // Ask for it to be pending, will go in
+ actionTrackingService.recordActionPending(action);
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Pending, action.getExecutionStatus());
+ assertNotNull(null, executingActionsCache.get(key));
+
+ ExecutionSummary s = ActionTrackingServiceImpl.buildExecutionSummary(action);
+ ExecutionDetails d = actionTrackingService.getExecutionDetails(s);
+ assertNotNull(d.getExecutionSummary());
+ assertEquals("sleep-action", d.getActionType());
+ assertEquals("1234", d.getActionId());
+ assertEquals(1, d.getExecutionInstance());
+ assertEquals(null, d.getPersistedActionRef());
+ assertNull(null, d.getStartedAt());
+
+
+ // Run it, will stay
+ actionTrackingService.recordActionExecuting(action);
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Running, action.getExecutionStatus());
+ assertNotNull(null, executingActionsCache.get(key));
+
+ s = ActionTrackingServiceImpl.buildExecutionSummary(action);
+ d = actionTrackingService.getExecutionDetails(s);
+ assertNotNull(d.getExecutionSummary());
+ assertEquals("sleep-action", d.getActionType());
+ assertEquals("1234", d.getActionId());
+ assertEquals(1, d.getExecutionInstance());
+ assertEquals(null, d.getPersistedActionRef());
+ assertNotNull(d.getStartedAt());
+
+
+ // Finish, goes
+ actionTrackingService.recordActionComplete(action);
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Completed, action.getExecutionStatus());
+ assertEquals(null, executingActionsCache.get(key));
+
+
+ // Put another pending one in
+ action = createWorkingSleepAction("1234");
+ actionTrackingService.recordActionPending(action);
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Pending, action.getExecutionStatus());
+ assertNotNull(null, executingActionsCache.get(key));
+
+
+ // Remove it by hand
+ executingActionsCache.remove(key);
+ assertNull(null, executingActionsCache.get(key));
+ int instanceId = ((ActionImpl)action).getExecutionInstance();
+
+
+ // Run it, will go back in again, ID unchanged
+ actionTrackingService.recordActionExecuting(action);
+ assertEquals(key, ActionTrackingServiceImpl.generateCacheKey(action));
+ assertEquals(instanceId, ((ActionImpl)action).getExecutionInstance());
+
+ assertEquals(ActionStatus.Running, action.getExecutionStatus());
+ assertNotNull(null, executingActionsCache.get(key));
+
+
+ // Finish, will go again
+ actionTrackingService.recordActionComplete(action);
+ key = ActionTrackingServiceImpl.generateCacheKey(action);
+ assertEquals(ActionStatus.Completed, action.getExecutionStatus());
+ assertEquals(null, executingActionsCache.get(key));
+ }
/** Ensure that the listing functions work */
public void testListings() throws Exception
diff --git a/repository/src/test/java/org/alfresco/repo/action/executer/AsynchronousExtractorTest.java b/repository/src/test/java/org/alfresco/repo/action/executer/AsynchronousExtractorTest.java
index 674ca7ae61..6997489973 100644
--- a/repository/src/test/java/org/alfresco/repo/action/executer/AsynchronousExtractorTest.java
+++ b/repository/src/test/java/org/alfresco/repo/action/executer/AsynchronousExtractorTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2022 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -66,12 +66,12 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.HeuristicMixedException;
+import jakarta.transaction.HeuristicRollbackException;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.UserTransaction;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
diff --git a/repository/src/test/java/org/alfresco/repo/action/scheduled/CronScheduledQueryBasedTemplateActionDefinitionTest.java b/repository/src/test/java/org/alfresco/repo/action/scheduled/CronScheduledQueryBasedTemplateActionDefinitionTest.java
index 25361ca017..66031f37be 100644
--- a/repository/src/test/java/org/alfresco/repo/action/scheduled/CronScheduledQueryBasedTemplateActionDefinitionTest.java
+++ b/repository/src/test/java/org/alfresco/repo/action/scheduled/CronScheduledQueryBasedTemplateActionDefinitionTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -34,8 +34,8 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Set;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/action/scheduled/FreeMarkerModelLuceneFunctionTest.java b/repository/src/test/java/org/alfresco/repo/action/scheduled/FreeMarkerModelLuceneFunctionTest.java
index 18b605c0e5..0aa2ea5406 100644
--- a/repository/src/test/java/org/alfresco/repo/action/scheduled/FreeMarkerModelLuceneFunctionTest.java
+++ b/repository/src/test/java/org/alfresco/repo/action/scheduled/FreeMarkerModelLuceneFunctionTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -30,7 +30,7 @@ import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/action/scheduled/ScheduledPersistedActionServiceTest.java b/repository/src/test/java/org/alfresco/repo/action/scheduled/ScheduledPersistedActionServiceTest.java
index d9def7289e..d91fd63d44 100644
--- a/repository/src/test/java/org/alfresco/repo/action/scheduled/ScheduledPersistedActionServiceTest.java
+++ b/repository/src/test/java/org/alfresco/repo/action/scheduled/ScheduledPersistedActionServiceTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 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,7 +28,7 @@ package org.alfresco.repo.action.scheduled;
import java.util.Date;
import java.util.List;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.ActionImpl;
diff --git a/repository/src/test/java/org/alfresco/repo/audit/access/AccessAuditorTest.java b/repository/src/test/java/org/alfresco/repo/audit/access/AccessAuditorTest.java
index b2bb84028a..3290737820 100644
--- a/repository/src/test/java/org/alfresco/repo/audit/access/AccessAuditorTest.java
+++ b/repository/src/test/java/org/alfresco/repo/audit/access/AccessAuditorTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -41,7 +41,7 @@ import java.util.Map;
import java.util.Properties;
import java.util.Set;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.audit.AuditComponent;
diff --git a/repository/src/test/java/org/alfresco/repo/bulkimport/impl/AbstractBulkImportTests.java b/repository/src/test/java/org/alfresco/repo/bulkimport/impl/AbstractBulkImportTests.java
index 3ce224a00f..c426b80f65 100644
--- a/repository/src/test/java/org/alfresco/repo/bulkimport/impl/AbstractBulkImportTests.java
+++ b/repository/src/test/java/org/alfresco/repo/bulkimport/impl/AbstractBulkImportTests.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -55,12 +55,12 @@ import org.junit.Before;
import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.HeuristicMixedException;
+import jakarta.transaction.HeuristicRollbackException;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.UserTransaction;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
diff --git a/repository/src/test/java/org/alfresco/repo/bulkimport/impl/BulkImportTest.java b/repository/src/test/java/org/alfresco/repo/bulkimport/impl/BulkImportTest.java
index f3bfde84bd..84723ce633 100644
--- a/repository/src/test/java/org/alfresco/repo/bulkimport/impl/BulkImportTest.java
+++ b/repository/src/test/java/org/alfresco/repo/bulkimport/impl/BulkImportTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -48,11 +48,11 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.springframework.util.ResourceUtils;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.SystemException;
+import jakarta.transaction.HeuristicMixedException;
+import jakarta.transaction.HeuristicRollbackException;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.SystemException;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
diff --git a/repository/src/test/java/org/alfresco/repo/cache/CacheTest.java b/repository/src/test/java/org/alfresco/repo/cache/CacheTest.java
index 349cb1f36a..d945458b5c 100644
--- a/repository/src/test/java/org/alfresco/repo/cache/CacheTest.java
+++ b/repository/src/test/java/org/alfresco/repo/cache/CacheTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 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,8 +28,8 @@ package org.alfresco.repo.cache;
import java.sql.SQLException;
import java.util.Collection;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
@@ -70,8 +70,8 @@ public class CacheTest extends TestCase
@SuppressWarnings("unchecked")
@Override
public void setUp() throws Exception
- {
- ctx = ApplicationContextHelper.getApplicationContext(
+ {
+ ctx = ApplicationContextHelper.getApplicationContext(
new String[] { "classpath:cache-test/cache-test-context.xml", ApplicationContextHelper.CONFIG_LOCATIONS[0] });
if (AlfrescoTransactionSupport.getTransactionReadState() != TxnReadState.TXN_NONE)
{
diff --git a/repository/src/test/java/org/alfresco/repo/content/AbstractReadOnlyContentStoreTest.java b/repository/src/test/java/org/alfresco/repo/content/AbstractReadOnlyContentStoreTest.java
index 7358e452d7..30c3daf541 100644
--- a/repository/src/test/java/org/alfresco/repo/content/AbstractReadOnlyContentStoreTest.java
+++ b/repository/src/test/java/org/alfresco/repo/content/AbstractReadOnlyContentStoreTest.java
@@ -1,54 +1,54 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.content;
-import java.nio.ByteBuffer;
-import java.nio.channels.FileChannel;
-import java.nio.channels.ReadableByteChannel;
-
-import javax.transaction.UserTransaction;
-
-import org.alfresco.service.cmr.repository.ContentReader;
-import org.alfresco.service.transaction.TransactionService;
-import org.alfresco.util.ApplicationContextHelper;
-import org.alfresco.util.BaseApplicationContextHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TestName;
-import org.springframework.context.ApplicationContext;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import java.nio.ByteBuffer;
+import java.nio.channels.FileChannel;
+import java.nio.channels.ReadableByteChannel;
+
+import jakarta.transaction.UserTransaction;
+
+import org.alfresco.service.cmr.repository.ContentReader;
+import org.alfresco.service.transaction.TransactionService;
+import org.alfresco.util.ApplicationContextHelper;
+import org.alfresco.util.BaseApplicationContextHelper;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestName;
+import org.springframework.context.ApplicationContext;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
* Abstract base class that provides a set of tests for implementations
@@ -163,11 +163,11 @@ public abstract class AbstractReadOnlyContentStoreTest
{
// Expected
}
- }
-
- /**
- * Tests to implement this method in order to provide some content to play with
- */
+ }
+
+ /**
+ * Tests to implement this method in order to provide some content to play with
+ */
protected abstract String getExistingContentUrl();
/**
diff --git a/repository/src/test/java/org/alfresco/repo/content/RoutingContentServiceTest.java b/repository/src/test/java/org/alfresco/repo/content/RoutingContentServiceTest.java
index d5b606833b..a18a8fa700 100644
--- a/repository/src/test/java/org/alfresco/repo/content/RoutingContentServiceTest.java
+++ b/repository/src/test/java/org/alfresco/repo/content/RoutingContentServiceTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -32,8 +32,8 @@ import java.io.Serializable;
import java.util.Locale;
import java.util.Map;
-import javax.transaction.RollbackException;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/copy/CopyServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/copy/CopyServiceImplTest.java
index 90c5874ad0..688b097939 100644
--- a/repository/src/test/java/org/alfresco/repo/copy/CopyServiceImplTest.java
+++ b/repository/src/test/java/org/alfresco/repo/copy/CopyServiceImplTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -32,7 +32,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/dictionary/DictionaryModelTypeTest.java b/repository/src/test/java/org/alfresco/repo/dictionary/DictionaryModelTypeTest.java
index 6f3cfe0b3e..8df799ef0a 100644
--- a/repository/src/test/java/org/alfresco/repo/dictionary/DictionaryModelTypeTest.java
+++ b/repository/src/test/java/org/alfresco/repo/dictionary/DictionaryModelTypeTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -31,7 +31,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import javax.xml.XMLConstants;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamSource;
diff --git a/repository/src/test/java/org/alfresco/repo/dictionary/DictionaryRepositoryBootstrapTest.java b/repository/src/test/java/org/alfresco/repo/dictionary/DictionaryRepositoryBootstrapTest.java
index 5405f853f4..df3ee38f08 100644
--- a/repository/src/test/java/org/alfresco/repo/dictionary/DictionaryRepositoryBootstrapTest.java
+++ b/repository/src/test/java/org/alfresco/repo/dictionary/DictionaryRepositoryBootstrapTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -32,7 +32,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Locale;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
diff --git a/repository/src/test/java/org/alfresco/repo/doclink/DocumentLinkServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/doclink/DocumentLinkServiceImplTest.java
index a7c964e138..c0c2e98f17 100644
--- a/repository/src/test/java/org/alfresco/repo/doclink/DocumentLinkServiceImplTest.java
+++ b/repository/src/test/java/org/alfresco/repo/doclink/DocumentLinkServiceImplTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -29,8 +29,8 @@ import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ApplicationModel;
diff --git a/repository/src/test/java/org/alfresco/repo/domain/audit/AuditDAOTest.java b/repository/src/test/java/org/alfresco/repo/domain/audit/AuditDAOTest.java
index 600cd186c6..c39f450d5f 100644
--- a/repository/src/test/java/org/alfresco/repo/domain/audit/AuditDAOTest.java
+++ b/repository/src/test/java/org/alfresco/repo/domain/audit/AuditDAOTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -37,7 +37,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.content.transform.AbstractContentTransformerTest;
diff --git a/repository/src/test/java/org/alfresco/repo/i18n/MessageServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/i18n/MessageServiceImplTest.java
index 67e28c4227..bf26d3b116 100644
--- a/repository/src/test/java/org/alfresco/repo/i18n/MessageServiceImplTest.java
+++ b/repository/src/test/java/org/alfresco/repo/i18n/MessageServiceImplTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -33,7 +33,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/imap/ImapMessageTest.java b/repository/src/test/java/org/alfresco/repo/imap/ImapMessageTest.java
index 0959725eea..24f5c9739e 100644
--- a/repository/src/test/java/org/alfresco/repo/imap/ImapMessageTest.java
+++ b/repository/src/test/java/org/alfresco/repo/imap/ImapMessageTest.java
@@ -48,7 +48,7 @@ import jakarta.mail.internet.InternetAddress;
import jakarta.mail.internet.MimeMessage;
import jakarta.mail.internet.MimeMultipart;
import jakarta.mail.internet.MimeUtility;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/imap/ImapServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/imap/ImapServiceImplTest.java
index f5a815cb9c..3b0f154f5f 100644
--- a/repository/src/test/java/org/alfresco/repo/imap/ImapServiceImplTest.java
+++ b/repository/src/test/java/org/alfresco/repo/imap/ImapServiceImplTest.java
@@ -54,7 +54,7 @@ import jakarta.mail.search.ReceivedDateTerm;
import jakarta.mail.search.SearchTerm;
import jakarta.mail.search.SentDateTerm;
import jakarta.mail.search.SubjectTerm;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/imap/LoadTester.java b/repository/src/test/java/org/alfresco/repo/imap/LoadTester.java
index 2debca9cf9..e60c5c3f45 100644
--- a/repository/src/test/java/org/alfresco/repo/imap/LoadTester.java
+++ b/repository/src/test/java/org/alfresco/repo/imap/LoadTester.java
@@ -26,7 +26,7 @@
package org.alfresco.repo.imap;
import jakarta.mail.Flags;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import java.io.IOException;
import java.util.Date;
import java.util.LinkedList;
diff --git a/repository/src/test/java/org/alfresco/repo/importer/FileImporterTest.java b/repository/src/test/java/org/alfresco/repo/importer/FileImporterTest.java
index e0ade70e79..bd3ac9ea43 100644
--- a/repository/src/test/java/org/alfresco/repo/importer/FileImporterTest.java
+++ b/repository/src/test/java/org/alfresco/repo/importer/FileImporterTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -30,12 +30,12 @@ import java.io.FileFilter;
import java.net.URL;
import java.util.List;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.HeuristicMixedException;
+import jakarta.transaction.HeuristicRollbackException;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/jscript/PeopleTest.java b/repository/src/test/java/org/alfresco/repo/jscript/PeopleTest.java
index 3e74b166c8..43d8a14e28 100644
--- a/repository/src/test/java/org/alfresco/repo/jscript/PeopleTest.java
+++ b/repository/src/test/java/org/alfresco/repo/jscript/PeopleTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2017 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -47,12 +47,12 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.context.ApplicationContext;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.HeuristicMixedException;
+import jakarta.transaction.HeuristicRollbackException;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.UserTransaction;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
diff --git a/repository/src/test/java/org/alfresco/repo/lock/mem/AbstractLockStoreTxTest.java b/repository/src/test/java/org/alfresco/repo/lock/mem/AbstractLockStoreTxTest.java
index f2848d7f68..484b2d50e4 100644
--- a/repository/src/test/java/org/alfresco/repo/lock/mem/AbstractLockStoreTxTest.java
+++ b/repository/src/test/java/org/alfresco/repo/lock/mem/AbstractLockStoreTxTest.java
@@ -1,50 +1,50 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.lock.mem;
-import java.util.Date;
-
-import javax.transaction.NotSupportedException;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
-
-import org.alfresco.repo.security.authentication.AuthenticationUtil;
-import org.alfresco.service.cmr.lock.LockType;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.transaction.TransactionService;
-import org.alfresco.util.ApplicationContextHelper;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.springframework.context.ApplicationContext;
-import org.springframework.dao.ConcurrencyFailureException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
+import java.util.Date;
+
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.UserTransaction;
+
+import org.alfresco.repo.security.authentication.AuthenticationUtil;
+import org.alfresco.service.cmr.lock.LockType;
+import org.alfresco.service.cmr.repository.NodeRef;
+import org.alfresco.service.transaction.TransactionService;
+import org.alfresco.util.ApplicationContextHelper;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.springframework.context.ApplicationContext;
+import org.springframework.dao.ConcurrencyFailureException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
/**
* Integration tests that check transaction related functionality of {@link LockStore} implementations.
@@ -57,8 +57,8 @@ public abstract class AbstractLockStoreTxTest
*/
protected T lockStore;
- protected static ApplicationContext ctx;
- protected static TransactionService transactionService;
+ protected static ApplicationContext ctx;
+ protected static TransactionService transactionService;
/**
* Concrete subclasses must implement this method to provide the tests with a LockStore instance.
@@ -70,7 +70,7 @@ public abstract class AbstractLockStoreTxTest
@BeforeClass
public static void setUpSpringContext()
{
- ctx = ApplicationContextHelper.getApplicationContext();
+ ctx = ApplicationContextHelper.getApplicationContext();
transactionService = (TransactionService) ctx.getBean("TransactionService");
}
@@ -78,21 +78,21 @@ public abstract class AbstractLockStoreTxTest
public void setUpLockStore()
{
lockStore = createLockStore();
- }
-
- /**
- *
- * - Start outer txn
- * - Modify lock in outer txn
- * - Start inner txn
- * - Modify lock in inner txn
- *
- * Inner transaction should fail while outer succeeds
- */
- @Test
- public void testRepeatableRead_01() throws Exception
- {
-
+ }
+
+ /**
+ *
+ * - Start outer txn
+ * - Modify lock in outer txn
+ * - Start inner txn
+ * - Modify lock in inner txn
+ *
+ * Inner transaction should fail while outer succeeds
+ */
+ @Test
+ public void testRepeatableRead_01() throws Exception
+ {
+
}
@Test
@@ -220,7 +220,7 @@ public abstract class AbstractLockStoreTxTest
throw new RuntimeException(error);
}
}
- }
+ }
@Test
public void testCannotSetLockWhenChangedByAnotherTx() throws NotSupportedException, SystemException
diff --git a/repository/src/test/java/org/alfresco/repo/model/filefolder/FileFolderServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/model/filefolder/FileFolderServiceImplTest.java
index 029efd44d8..b502847b75 100644
--- a/repository/src/test/java/org/alfresco/repo/model/filefolder/FileFolderServiceImplTest.java
+++ b/repository/src/test/java/org/alfresco/repo/model/filefolder/FileFolderServiceImplTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -38,8 +38,8 @@ import java.util.Locale;
import java.util.Set;
import java.util.Map.Entry;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/model/filefolder/HiddenAspectCmisConfigTest.java b/repository/src/test/java/org/alfresco/repo/model/filefolder/HiddenAspectCmisConfigTest.java
index 7229c1bb25..51017ca276 100644
--- a/repository/src/test/java/org/alfresco/repo/model/filefolder/HiddenAspectCmisConfigTest.java
+++ b/repository/src/test/java/org/alfresco/repo/model/filefolder/HiddenAspectCmisConfigTest.java
@@ -1,32 +1,32 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.model.filefolder;
-import javax.transaction.NotSupportedException;
-import javax.transaction.SystemException;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.SystemException;
import org.junit.After;
import org.junit.Before;
diff --git a/repository/src/test/java/org/alfresco/repo/model/filefolder/HiddenAspectTest.java b/repository/src/test/java/org/alfresco/repo/model/filefolder/HiddenAspectTest.java
index 6decdcc32f..c6728ef4fd 100644
--- a/repository/src/test/java/org/alfresco/repo/model/filefolder/HiddenAspectTest.java
+++ b/repository/src/test/java/org/alfresco/repo/model/filefolder/HiddenAspectTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -40,10 +40,10 @@ import java.util.Locale;
import java.util.Map;
import java.util.Properties;
-import javax.transaction.NotSupportedException;
-import javax.transaction.Status;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.Status;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
diff --git a/repository/src/test/java/org/alfresco/repo/model/ml/tools/LanguagesTest.java b/repository/src/test/java/org/alfresco/repo/model/ml/tools/LanguagesTest.java
index dc4b6b6f7d..5317c35ede 100644
--- a/repository/src/test/java/org/alfresco/repo/model/ml/tools/LanguagesTest.java
+++ b/repository/src/test/java/org/alfresco/repo/model/ml/tools/LanguagesTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -25,8 +25,8 @@
*/
package org.alfresco.repo.model.ml.tools;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/module/ComponentsTest.java b/repository/src/test/java/org/alfresco/repo/module/ComponentsTest.java
index 28eb8aa264..308e1a5224 100644
--- a/repository/src/test/java/org/alfresco/repo/module/ComponentsTest.java
+++ b/repository/src/test/java/org/alfresco/repo/module/ComponentsTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -27,7 +27,7 @@ package org.alfresco.repo.module;
import java.util.Collection;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/node/ConcurrentNodeServiceSearchTest.java b/repository/src/test/java/org/alfresco/repo/node/ConcurrentNodeServiceSearchTest.java
index 1810c9556c..e2e3551d86 100644
--- a/repository/src/test/java/org/alfresco/repo/node/ConcurrentNodeServiceSearchTest.java
+++ b/repository/src/test/java/org/alfresco/repo/node/ConcurrentNodeServiceSearchTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 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,7 +28,7 @@ package org.alfresco.repo.node;
import java.io.InputStream;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java b/repository/src/test/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java
index 2bdbc04517..b8c4d19b12 100644
--- a/repository/src/test/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java
+++ b/repository/src/test/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.node.archive;
import java.io.InputStream;
@@ -36,8 +36,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
@@ -126,8 +126,8 @@ public class ArchiveAndRestoreTest extends TestCase
@Override
public void setUp() throws Exception
- {
- ctx = ApplicationContextHelper.getApplicationContext();
+ {
+ ctx = ApplicationContextHelper.getApplicationContext();
ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean("ServiceRegistry");
nodeArchiveService = (NodeArchiveService) ctx.getBean("nodeArchiveService");
diff --git a/repository/src/test/java/org/alfresco/repo/node/cleanup/DeletedNodeBatchCleanupTest.java b/repository/src/test/java/org/alfresco/repo/node/cleanup/DeletedNodeBatchCleanupTest.java
index 2a760a2574..d3489a510d 100644
--- a/repository/src/test/java/org/alfresco/repo/node/cleanup/DeletedNodeBatchCleanupTest.java
+++ b/repository/src/test/java/org/alfresco/repo/node/cleanup/DeletedNodeBatchCleanupTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2022 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -29,7 +29,7 @@ package org.alfresco.repo.node.cleanup;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Stream.of;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/repository/src/test/java/org/alfresco/repo/node/cleanup/TransactionCleanupTest.java b/repository/src/test/java/org/alfresco/repo/node/cleanup/TransactionCleanupTest.java
index f345f7728a..64d2b830ef 100644
--- a/repository/src/test/java/org/alfresco/repo/node/cleanup/TransactionCleanupTest.java
+++ b/repository/src/test/java/org/alfresco/repo/node/cleanup/TransactionCleanupTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -36,7 +36,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.cache.SimpleCache;
diff --git a/repository/src/test/java/org/alfresco/repo/node/db/DbNodeServiceImplPropagationTest.java b/repository/src/test/java/org/alfresco/repo/node/db/DbNodeServiceImplPropagationTest.java
index 7835a5ba36..90f3f51cfe 100644
--- a/repository/src/test/java/org/alfresco/repo/node/db/DbNodeServiceImplPropagationTest.java
+++ b/repository/src/test/java/org/alfresco/repo/node/db/DbNodeServiceImplPropagationTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -29,7 +29,7 @@ import java.io.InputStream;
import java.util.Date;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.dictionary.DictionaryComponent;
diff --git a/repository/src/test/java/org/alfresco/repo/node/db/DbNodeServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/node/db/DbNodeServiceImplTest.java
index ab40cab742..1c76cceef8 100644
--- a/repository/src/test/java/org/alfresco/repo/node/db/DbNodeServiceImplTest.java
+++ b/repository/src/test/java/org/alfresco/repo/node/db/DbNodeServiceImplTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -34,7 +34,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.domain.dialect.Dialect;
diff --git a/repository/src/test/java/org/alfresco/repo/node/integrity/IncompleteNodeTaggerTest.java b/repository/src/test/java/org/alfresco/repo/node/integrity/IncompleteNodeTaggerTest.java
index dae69d1131..30ae73455c 100644
--- a/repository/src/test/java/org/alfresco/repo/node/integrity/IncompleteNodeTaggerTest.java
+++ b/repository/src/test/java/org/alfresco/repo/node/integrity/IncompleteNodeTaggerTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -30,7 +30,7 @@ import java.util.Map;
import java.util.Set;
import java.util.UUID;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/node/integrity/IntegrityTest.java b/repository/src/test/java/org/alfresco/repo/node/integrity/IntegrityTest.java
index 91a37438fa..514b6d6a57 100644
--- a/repository/src/test/java/org/alfresco/repo/node/integrity/IntegrityTest.java
+++ b/repository/src/test/java/org/alfresco/repo/node/integrity/IntegrityTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -29,7 +29,7 @@ import java.io.InputStream;
import java.io.Serializable;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/ownable/impl/OwnableServiceTest.java b/repository/src/test/java/org/alfresco/repo/ownable/impl/OwnableServiceTest.java
index 54373f3394..dbf1e1b61c 100644
--- a/repository/src/test/java/org/alfresco/repo/ownable/impl/OwnableServiceTest.java
+++ b/repository/src/test/java/org/alfresco/repo/ownable/impl/OwnableServiceTest.java
@@ -1,34 +1,34 @@
-/*
+/*
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.ownable.impl;
import java.io.Serializable;
import java.util.HashMap;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/policy/PolicyComponentTransactionTest.java b/repository/src/test/java/org/alfresco/repo/policy/PolicyComponentTransactionTest.java
index 67935d50d8..f6744514cf 100644
--- a/repository/src/test/java/org/alfresco/repo/policy/PolicyComponentTransactionTest.java
+++ b/repository/src/test/java/org/alfresco/repo/policy/PolicyComponentTransactionTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.policy;
import java.io.Serializable;
@@ -31,7 +31,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
@@ -95,7 +95,7 @@ public class PolicyComponentTransactionTest extends TestCase
@Override
protected void setUp() throws Exception
- {
+ {
applicationContext = ApplicationContextHelper.getApplicationContext();
// initialise policy test model
DictionaryBootstrap bootstrap = new DictionaryBootstrap();
diff --git a/repository/src/test/java/org/alfresco/repo/replication/ReplicationServiceIntegrationTest.java b/repository/src/test/java/org/alfresco/repo/replication/ReplicationServiceIntegrationTest.java
index cd1adfed8b..abfce01a41 100644
--- a/repository/src/test/java/org/alfresco/repo/replication/ReplicationServiceIntegrationTest.java
+++ b/repository/src/test/java/org/alfresco/repo/replication/ReplicationServiceIntegrationTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -34,7 +34,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/rule/RuleServiceCoverageTest.java b/repository/src/test/java/org/alfresco/repo/rule/RuleServiceCoverageTest.java
index ef5d4b0986..17890a0f60 100644
--- a/repository/src/test/java/org/alfresco/repo/rule/RuleServiceCoverageTest.java
+++ b/repository/src/test/java/org/alfresco/repo/rule/RuleServiceCoverageTest.java
@@ -37,7 +37,7 @@ import java.util.Map;
import jakarta.mail.MessagingException;
import jakarta.mail.internet.MimeMessage;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/rule/RuleServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/rule/RuleServiceImplTest.java
index c05b5b797e..d53ce3d030 100644
--- a/repository/src/test/java/org/alfresco/repo/rule/RuleServiceImplTest.java
+++ b/repository/src/test/java/org/alfresco/repo/rule/RuleServiceImplTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -71,7 +71,7 @@ import org.junit.Before;
import org.junit.experimental.categories.Category;
import org.junit.Test;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.springframework.test.annotation.Commit;
import org.springframework.test.context.transaction.TestTransaction;
import org.springframework.transaction.annotation.Transactional;
diff --git a/repository/src/test/java/org/alfresco/repo/search/SearchServiceTest.java b/repository/src/test/java/org/alfresco/repo/search/SearchServiceTest.java
index 0f70291f58..686f0dc1ec 100644
--- a/repository/src/test/java/org/alfresco/repo/search/SearchServiceTest.java
+++ b/repository/src/test/java/org/alfresco/repo/search/SearchServiceTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2022 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -25,7 +25,7 @@
*/
package org.alfresco.repo.search;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.search.impl.DisabledFeatureException;
diff --git a/repository/src/test/java/org/alfresco/repo/search/SearcherComponentTest.java b/repository/src/test/java/org/alfresco/repo/search/SearcherComponentTest.java
index e9de62a877..8c1ea83432 100644
--- a/repository/src/test/java/org/alfresco/repo/search/SearcherComponentTest.java
+++ b/repository/src/test/java/org/alfresco/repo/search/SearcherComponentTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -30,8 +30,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.domain.dialect.Dialect;
diff --git a/repository/src/test/java/org/alfresco/repo/search/impl/querymodel/impl/db/DBQueryTest.java b/repository/src/test/java/org/alfresco/repo/search/impl/querymodel/impl/db/DBQueryTest.java
index dfb43eadf8..5fa7293611 100644
--- a/repository/src/test/java/org/alfresco/repo/search/impl/querymodel/impl/db/DBQueryTest.java
+++ b/repository/src/test/java/org/alfresco/repo/search/impl/querymodel/impl/db/DBQueryTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -41,8 +41,8 @@ import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.dictionary.DictionaryDAO;
diff --git a/repository/src/test/java/org/alfresco/repo/security/authentication/AuthenticationTest.java b/repository/src/test/java/org/alfresco/repo/security/authentication/AuthenticationTest.java
index aaae0e3ae4..fd9647de7f 100644
--- a/repository/src/test/java/org/alfresco/repo/security/authentication/AuthenticationTest.java
+++ b/repository/src/test/java/org/alfresco/repo/security/authentication/AuthenticationTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -32,8 +32,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
import net.sf.acegisecurity.AccountExpiredException;
diff --git a/repository/src/test/java/org/alfresco/repo/security/authentication/UpgradePasswordHashTest.java b/repository/src/test/java/org/alfresco/repo/security/authentication/UpgradePasswordHashTest.java
index 78b23529c5..eafeb8fe33 100644
--- a/repository/src/test/java/org/alfresco/repo/security/authentication/UpgradePasswordHashTest.java
+++ b/repository/src/test/java/org/alfresco/repo/security/authentication/UpgradePasswordHashTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.security.authentication;
import java.io.Serializable;
@@ -31,8 +31,8 @@ import java.util.Arrays;
import java.util.List;
import java.util.Map;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/security/authority/AuthorityServiceTest.java b/repository/src/test/java/org/alfresco/repo/security/authority/AuthorityServiceTest.java
index adbaa5f8c1..8447461b9b 100644
--- a/repository/src/test/java/org/alfresco/repo/security/authority/AuthorityServiceTest.java
+++ b/repository/src/test/java/org/alfresco/repo/security/authority/AuthorityServiceTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -39,8 +39,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
import net.sf.acegisecurity.AuthenticationCredentialsNotFoundException;
diff --git a/repository/src/test/java/org/alfresco/repo/security/authority/script/ScriptAuthorityServiceTest.java b/repository/src/test/java/org/alfresco/repo/security/authority/script/ScriptAuthorityServiceTest.java
index 9f908ee4f0..9e4b2d18d6 100644
--- a/repository/src/test/java/org/alfresco/repo/security/authority/script/ScriptAuthorityServiceTest.java
+++ b/repository/src/test/java/org/alfresco/repo/security/authority/script/ScriptAuthorityServiceTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -32,8 +32,8 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/security/permissions/dynamic/LockOwnerDynamicAuthorityTest.java b/repository/src/test/java/org/alfresco/repo/security/permissions/dynamic/LockOwnerDynamicAuthorityTest.java
index 3a8d61b90b..a86fa175ae 100644
--- a/repository/src/test/java/org/alfresco/repo/security/permissions/dynamic/LockOwnerDynamicAuthorityTest.java
+++ b/repository/src/test/java/org/alfresco/repo/security/permissions/dynamic/LockOwnerDynamicAuthorityTest.java
@@ -1,35 +1,35 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.security.permissions.dynamic;
import java.io.Serializable;
import java.util.Map;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AbstractPermissionTest.java b/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AbstractPermissionTest.java
index 03aee7a704..0bcbe57dab 100644
--- a/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AbstractPermissionTest.java
+++ b/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AbstractPermissionTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2021 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -29,7 +29,7 @@ import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AbstractReadPermissionTest.java b/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AbstractReadPermissionTest.java
index 4596828e0f..0b5389c44c 100644
--- a/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AbstractReadPermissionTest.java
+++ b/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AbstractReadPermissionTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -30,7 +30,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Random;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
diff --git a/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AclDaoComponentTest.java b/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AclDaoComponentTest.java
index 59ebfabe32..be207b21dc 100644
--- a/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AclDaoComponentTest.java
+++ b/repository/src/test/java/org/alfresco/repo/security/permissions/impl/AclDaoComponentTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -35,13 +35,13 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.HeuristicMixedException;
+import jakarta.transaction.HeuristicRollbackException;
+import jakarta.transaction.NotSupportedException;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.Status;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/security/person/HomeFolderProviderSynchronizerTest.java b/repository/src/test/java/org/alfresco/repo/security/person/HomeFolderProviderSynchronizerTest.java
index 5b33b96fbb..b0e8dd8d64 100644
--- a/repository/src/test/java/org/alfresco/repo/security/person/HomeFolderProviderSynchronizerTest.java
+++ b/repository/src/test/java/org/alfresco/repo/security/person/HomeFolderProviderSynchronizerTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.security.person;
import static org.junit.Assert.assertEquals;
@@ -37,8 +37,8 @@ import java.util.List;
import java.util.Locale;
import java.util.Set;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
diff --git a/repository/src/test/java/org/alfresco/repo/security/person/PersonTest.java b/repository/src/test/java/org/alfresco/repo/security/person/PersonTest.java
index 9c8deb0543..4d049880f7 100644
--- a/repository/src/test/java/org/alfresco/repo/security/person/PersonTest.java
+++ b/repository/src/test/java/org/alfresco/repo/security/person/PersonTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -36,7 +36,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.Assert;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/site/SiteServiceTestHuge.java b/repository/src/test/java/org/alfresco/repo/site/SiteServiceTestHuge.java
index 6c9fa746ba..e0f29d0b4c 100644
--- a/repository/src/test/java/org/alfresco/repo/site/SiteServiceTestHuge.java
+++ b/repository/src/test/java/org/alfresco/repo/site/SiteServiceTestHuge.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -31,8 +31,8 @@ import java.io.File;
import java.io.PrintStream;
import java.util.Set;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.SystemException;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
diff --git a/repository/src/test/java/org/alfresco/repo/subscriptions/SubscriptionServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/subscriptions/SubscriptionServiceImplTest.java
index 8040815c2d..7393bd827f 100644
--- a/repository/src/test/java/org/alfresco/repo/subscriptions/SubscriptionServiceImplTest.java
+++ b/repository/src/test/java/org/alfresco/repo/subscriptions/SubscriptionServiceImplTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -25,8 +25,8 @@
*/
package org.alfresco.repo.subscriptions;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/tagging/UpdateTagScopesActionExecuterTest.java b/repository/src/test/java/org/alfresco/repo/tagging/UpdateTagScopesActionExecuterTest.java
index 37dfb0983f..1af14ebdd0 100644
--- a/repository/src/test/java/org/alfresco/repo/tagging/UpdateTagScopesActionExecuterTest.java
+++ b/repository/src/test/java/org/alfresco/repo/tagging/UpdateTagScopesActionExecuterTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -31,8 +31,8 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
diff --git a/repository/src/test/java/org/alfresco/repo/transaction/AlfrescoTransactionSupportTest.java b/repository/src/test/java/org/alfresco/repo/transaction/AlfrescoTransactionSupportTest.java
index 6265cb255b..cfaf9347fd 100644
--- a/repository/src/test/java/org/alfresco/repo/transaction/AlfrescoTransactionSupportTest.java
+++ b/repository/src/test/java/org/alfresco/repo/transaction/AlfrescoTransactionSupportTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -29,7 +29,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.repo.transaction.AlfrescoTransactionSupport.TxnReadState;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
diff --git a/repository/src/test/java/org/alfresco/repo/transaction/ConnectionPoolOverloadTest.java b/repository/src/test/java/org/alfresco/repo/transaction/ConnectionPoolOverloadTest.java
index 586246d39d..3616015be9 100644
--- a/repository/src/test/java/org/alfresco/repo/transaction/ConnectionPoolOverloadTest.java
+++ b/repository/src/test/java/org/alfresco/repo/transaction/ConnectionPoolOverloadTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -31,7 +31,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.ApplicationContextHelper;
diff --git a/repository/src/test/java/org/alfresco/repo/transaction/RetryingTransactionHelperTest.java b/repository/src/test/java/org/alfresco/repo/transaction/RetryingTransactionHelperTest.java
index d97affe247..7856702a91 100644
--- a/repository/src/test/java/org/alfresco/repo/transaction/RetryingTransactionHelperTest.java
+++ b/repository/src/test/java/org/alfresco/repo/transaction/RetryingTransactionHelperTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -35,8 +35,8 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.error.ExceptionStackUtil;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.domain.dialect.Dialect;
diff --git a/repository/src/test/java/org/alfresco/repo/transaction/TransactionAwareSingletonTest.java b/repository/src/test/java/org/alfresco/repo/transaction/TransactionAwareSingletonTest.java
index c2903817b7..2518a83d41 100644
--- a/repository/src/test/java/org/alfresco/repo/transaction/TransactionAwareSingletonTest.java
+++ b/repository/src/test/java/org/alfresco/repo/transaction/TransactionAwareSingletonTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -27,7 +27,7 @@ package org.alfresco.repo.transaction;
import java.util.Random;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.transaction.TransactionService;
diff --git a/repository/src/test/java/org/alfresco/repo/transaction/TransactionServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/transaction/TransactionServiceImplTest.java
index d87f7452b9..2375dcf626 100644
--- a/repository/src/test/java/org/alfresco/repo/transaction/TransactionServiceImplTest.java
+++ b/repository/src/test/java/org/alfresco/repo/transaction/TransactionServiceImplTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -25,9 +25,9 @@
*/
package org.alfresco.repo.transaction;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.RollbackException;
+import jakarta.transaction.Status;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.domain.dialect.Dialect;
diff --git a/repository/src/test/java/org/alfresco/repo/transfer/TransferServiceCallbackTest.java b/repository/src/test/java/org/alfresco/repo/transfer/TransferServiceCallbackTest.java
index 7a3557d377..436193f0b9 100644
--- a/repository/src/test/java/org/alfresco/repo/transfer/TransferServiceCallbackTest.java
+++ b/repository/src/test/java/org/alfresco/repo/transfer/TransferServiceCallbackTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -41,7 +41,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
@@ -175,7 +175,7 @@ public class TransferServiceCallbackTest extends TestCase
@Override
protected void tearDown() throws Exception
{
- if (tx.getStatus() == javax.transaction.Status.STATUS_ACTIVE)
+ if (tx.getStatus() == jakarta.transaction.Status.STATUS_ACTIVE)
{
tx.rollback();
}
diff --git a/repository/src/test/java/org/alfresco/repo/usage/RepoUsageComponentTest.java b/repository/src/test/java/org/alfresco/repo/usage/RepoUsageComponentTest.java
index 1f7c104c75..38c33da00b 100644
--- a/repository/src/test/java/org/alfresco/repo/usage/RepoUsageComponentTest.java
+++ b/repository/src/test/java/org/alfresco/repo/usage/RepoUsageComponentTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -27,7 +27,7 @@ package org.alfresco.repo.usage;
import java.util.concurrent.TimeUnit;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.repo.lock.JobLockService;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
diff --git a/repository/src/test/java/org/alfresco/repo/usage/UserUsageTest.java b/repository/src/test/java/org/alfresco/repo/usage/UserUsageTest.java
index 64b2b288ae..996220576e 100644
--- a/repository/src/test/java/org/alfresco/repo/usage/UserUsageTest.java
+++ b/repository/src/test/java/org/alfresco/repo/usage/UserUsageTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.usage;
@@ -33,7 +33,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
@@ -63,8 +63,8 @@ import org.alfresco.service.transaction.TransactionService;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.junit.After;
+import org.apache.commons.logging.LogFactory;
+import org.junit.After;
import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
@@ -104,7 +104,7 @@ public class UserUsageTest extends TestCase
private List nodesToDelete = new LinkedList<>();
protected void setUp() throws Exception
- {
+ {
applicationContext = ApplicationContextHelper.getApplicationContext();
if (AlfrescoTransactionSupport.isActualTransactionActive())
{
@@ -132,7 +132,7 @@ public class UserUsageTest extends TestCase
repoAdminService = (RepoAdminService) applicationContext.getBean("repoAdminService");
testTX = transactionService.getUserTransaction();
- testTX.begin();
+ testTX.begin();
//Authenticate as the admin user
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
@@ -235,8 +235,8 @@ public class UserUsageTest extends TestCase
}
return null;
}
- }, true, true);
-
+ }, true, true);
+
AuthenticationUtil.clearCurrentSecurityContext();
}
@@ -1057,11 +1057,11 @@ public class UserUsageTest extends TestCase
private void takeOwnership(NodeRef nodeRef)
{
ownableService.takeOwnership(nodeRef);
- }
-
- @After
- public void after() throws Exception
- {
- AuthenticationUtil.popAuthentication();
+ }
+
+ @After
+ public void after() throws Exception
+ {
+ AuthenticationUtil.popAuthentication();
}
}
diff --git a/repository/src/test/java/org/alfresco/repo/usage/UserUsageTrackingComponentTest.java b/repository/src/test/java/org/alfresco/repo/usage/UserUsageTrackingComponentTest.java
index 1d5a432072..ae9ef6a43c 100644
--- a/repository/src/test/java/org/alfresco/repo/usage/UserUsageTrackingComponentTest.java
+++ b/repository/src/test/java/org/alfresco/repo/usage/UserUsageTrackingComponentTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
package org.alfresco.repo.usage;
@@ -30,7 +30,7 @@ import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import junit.framework.TestCase;
@@ -89,7 +89,7 @@ public class UserUsageTrackingComponentTest extends TestCase
private static final int PROGRESS_SIZE = 100;
protected void setUp() throws Exception
- {
+ {
applicationContext = ApplicationContextHelper.getApplicationContext();
if (AlfrescoTransactionSupport.isActualTransactionActive())
{
diff --git a/repository/src/test/java/org/alfresco/repo/version/VersionServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/version/VersionServiceImplTest.java
index e116a86165..9c1c533f69 100644
--- a/repository/src/test/java/org/alfresco/repo/version/VersionServiceImplTest.java
+++ b/repository/src/test/java/org/alfresco/repo/version/VersionServiceImplTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -38,7 +38,7 @@ import java.util.Optional;
import java.util.Properties;
import java.util.Set;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
diff --git a/repository/src/test/java/org/alfresco/repo/virtual/VirtualizationIntegrationTest.java b/repository/src/test/java/org/alfresco/repo/virtual/VirtualizationIntegrationTest.java
index 98a6828fa2..a108e7de2f 100644
--- a/repository/src/test/java/org/alfresco/repo/virtual/VirtualizationIntegrationTest.java
+++ b/repository/src/test/java/org/alfresco/repo/virtual/VirtualizationIntegrationTest.java
@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
- * Copyright (C) 2005 - 2016 Alfresco Software Limited
+ * Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -47,7 +47,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-import javax.transaction.UserTransaction;
+import jakarta.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.forms.FormData;