From efb7d7e0c0bdcf7b5bc5b44c5a8a20babee3d408 Mon Sep 17 00:00:00 2001 From: Isuru Wijesiri Date: Wed, 1 Nov 2023 15:08:31 +0530 Subject: [PATCH 1/4] Disable existing transaction counter --- .../protocol/jms/JMSInjectHandler.java | 3 -- .../endpoint/protocol/jms/JMSUtils.java | 4 -- .../apis/ManagementInternalApi.java | 6 ++- .../initializer/ServiceBusInitializer.java | 42 +++++++++---------- .../dbscripts/db2/db2_transaction_count.sql | 1 + .../mssql/mssql_transaction_count.sql | 1 + .../mysql/mysql_transaction_count.sql | 1 + .../oracle_rac_transaction_count.sql | 1 + .../oracle/oracle_transaction_count.sql | 1 + .../postgres/postgresql_transaction_count.sql | 1 + .../config-tool/deployment-full.toml | 7 ---- .../mediation-tests/tests-platform/pom.xml | 7 +++- 12 files changed, 35 insertions(+), 40 deletions(-) diff --git a/components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/jms/JMSInjectHandler.java b/components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/jms/JMSInjectHandler.java index 4498b19afe..b8b3e0519d 100644 --- a/components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/jms/JMSInjectHandler.java +++ b/components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/jms/JMSInjectHandler.java @@ -152,9 +152,6 @@ public boolean invoke(Object object, String name) throws SynapseException { } axis2MsgCtx.setProperty(MessageContext.TRANSPORT_HEADERS, transportHeaders); - // set transaction property - axis2MsgCtx.setProperty(BaseConstants.INTERNAL_TRANSACTION_COUNTED, - msg.getBooleanProperty(BaseConstants.INTERNAL_TRANSACTION_COUNTED)); // set the JMS Message ID as the Message ID of the MessageContext try { if (msg.getJMSMessageID() != null) { diff --git a/components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/jms/JMSUtils.java b/components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/jms/JMSUtils.java index 876a00dcc9..aa1cc21a8b 100644 --- a/components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/jms/JMSUtils.java +++ b/components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/jms/JMSUtils.java @@ -429,10 +429,6 @@ public static Map getTransportHeaders(Message message, MessageCo log.error("Error while reading the Transport Headers from JMS Message", e); } - // remove "INTERNAL_TRANSACTION_COUNTED" header from the transport level headers map. - // this property will be maintained in the message context. Therefore, no need to set this in the transport - // headers. - map.remove(BaseConstants.INTERNAL_TRANSACTION_COUNTED); return map; } diff --git a/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/ManagementInternalApi.java b/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/ManagementInternalApi.java index b27f7092ee..d3f42cd3fd 100644 --- a/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/ManagementInternalApi.java +++ b/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/ManagementInternalApi.java @@ -101,8 +101,10 @@ public ManagementInternalApi() { resourcesList.add(new ApiResourceAdapter(PREFIX_LOGOUT, new LogoutResource())); resourcesList.add(new ApiResourceAdapter(PREFIX_SERVER_DATA, new MetaDataResource())); resourcesList.add(new LogFilesResource(PREFIX_LOG_FILES)); - resourcesList.add(new ApiResourceAdapter(PREFIX_TRANSACTION + PATH_PARAM_TRANSACTION, - new RequestCountResource())); + + // Disabling this API as this version of transaction counter is deprecated. + // resourcesList.add(new ApiResourceAdapter(PREFIX_TRANSACTION + PATH_PARAM_TRANSACTION, new RequestCountResource())); + resourcesList.add(new ExternalVaultResource(PREFIX_EXTERNAL_VAULTS + PATH_PARAM_EXTERNAL_VAULT_NAME)); resourcesList.add(new ApiResourceAdapter(PREFIX_DATA_SOURCES, new DataSourceResource())); diff --git a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/ServiceBusInitializer.java b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/ServiceBusInitializer.java index 6209bb3631..374d65d4c1 100644 --- a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/ServiceBusInitializer.java +++ b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/ServiceBusInitializer.java @@ -58,8 +58,6 @@ import org.wso2.micro.integrator.initializer.deployment.application.deployer.CappDeployer; import org.wso2.micro.integrator.initializer.handler.ProxyLogHandler; import org.wso2.micro.integrator.initializer.handler.SynapseExternalPropertyConfigurator; -import org.wso2.micro.integrator.initializer.handler.transaction.TransactionCountHandler; -import org.wso2.micro.integrator.initializer.handler.transaction.TransactionCountHandlerComponent; import org.wso2.micro.integrator.initializer.persistence.MediationPersistenceManager; import org.wso2.micro.integrator.initializer.services.SynapseConfigurationService; import org.wso2.micro.integrator.initializer.services.SynapseConfigurationServiceImpl; @@ -80,10 +78,7 @@ import java.nio.file.Paths; import java.util.Iterator; import java.util.List; -import java.util.Objects; import java.util.Properties; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; @@ -111,9 +106,9 @@ public class ServiceBusInitializer { private DataSourceService dataSourceService; - private TransactionCountHandlerComponent transactionCountHandlerComponent; - - private ExecutorService transactionCountExecutor; + // This implementation of transaction counter is deprecated + // private TransactionCountHandlerComponent transactionCountHandlerComponent; + // private ExecutorService transactionCountExecutor; @Activate protected void activate(ComponentContext ctxt) { @@ -198,14 +193,14 @@ protected void activate(ComponentContext ctxt) { synapseEnvironment.registerSynapseHandler(new SynapseExternalPropertyConfigurator()); synapseEnvironment.registerSynapseHandler(new ProxyLogHandler()); - // Register internal transaction synapse handler - boolean transactionPropertyEnabled = TransactionCountHandlerComponent.isTransactionPropertyEnabled(); - if (transactionPropertyEnabled) { - transactionCountHandlerComponent = new TransactionCountHandlerComponent(); - transactionCountHandlerComponent.start(dataSourceService); - transactionCountExecutor = Executors.newFixedThreadPool(100); - synapseEnvironment.registerSynapseHandler(new TransactionCountHandler(transactionCountExecutor)); - } + // This implementation of transaction counter is deprecated + // boolean transactionPropertyEnabled = TransactionCountHandlerComponent.isTransactionPropertyEnabled(); + // if (transactionPropertyEnabled) { + // transactionCountHandlerComponent = new TransactionCountHandlerComponent(); + // transactionCountHandlerComponent.start(dataSourceService); + // transactionCountExecutor = Executors.newFixedThreadPool(100); + // synapseEnvironment.registerSynapseHandler(new TransactionCountHandler(transactionCountExecutor)); + // } if (log.isDebugEnabled()) { log.debug("SynapseEnvironmentService Registered"); } @@ -260,12 +255,15 @@ private String getMainSequenceName(String cappName) { @Deactivate protected void deactivate(ComponentContext ctxt) { - if (Objects.nonNull(transactionCountHandlerComponent)) { - transactionCountHandlerComponent.cleanup(); - } - if (Objects.nonNull(transactionCountExecutor)) { - transactionCountExecutor.shutdownNow(); - } + + // This implementation of transaction counter is deprecated + // if (Objects.nonNull(transactionCountHandlerComponent)) { + // transactionCountHandlerComponent.cleanup(); + // } + // if (Objects.nonNull(transactionCountExecutor)) { + // transactionCountExecutor.shutdownNow(); + // } + List handlers = serverManager.getServerContextInformation().getSynapseEnvironment().getSynapseHandlers(); Iterator iterator = handlers.iterator(); while (iterator.hasNext()) { diff --git a/distribution/src/dbscripts/db2/db2_transaction_count.sql b/distribution/src/dbscripts/db2/db2_transaction_count.sql index 903a8e2ebf..f0d763ef44 100644 --- a/distribution/src/dbscripts/db2/db2_transaction_count.sql +++ b/distribution/src/dbscripts/db2/db2_transaction_count.sql @@ -1,3 +1,4 @@ +-- Related to the deprecated transaction counter feature CREATE TABLE IF NOT EXISTS CURRENT_STATS ( TIME_STAMP DATE NOT NULL, NODE_ID VARCHAR(40) NOT NULL, diff --git a/distribution/src/dbscripts/mssql/mssql_transaction_count.sql b/distribution/src/dbscripts/mssql/mssql_transaction_count.sql index 28ea169aa0..d244c4057f 100644 --- a/distribution/src/dbscripts/mssql/mssql_transaction_count.sql +++ b/distribution/src/dbscripts/mssql/mssql_transaction_count.sql @@ -1,3 +1,4 @@ +-- Related to the deprecated transaction counter feature IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[CURRENT_STATS]') AND TYPE IN (N'U')) CREATE TABLE CURRENT_STATS ( TIME_STAMP DATE NOT NULL, diff --git a/distribution/src/dbscripts/mysql/mysql_transaction_count.sql b/distribution/src/dbscripts/mysql/mysql_transaction_count.sql index aa84912dc5..8662490e90 100644 --- a/distribution/src/dbscripts/mysql/mysql_transaction_count.sql +++ b/distribution/src/dbscripts/mysql/mysql_transaction_count.sql @@ -1,3 +1,4 @@ +-- Related to the deprecated transaction counter feature CREATE TABLE IF NOT EXISTS CURRENT_STATS ( TIME_STAMP DATE NOT NULL, NODE_ID VARCHAR(40) NOT NULL, diff --git a/distribution/src/dbscripts/oracle-rac/oracle_rac_transaction_count.sql b/distribution/src/dbscripts/oracle-rac/oracle_rac_transaction_count.sql index aacef1ef4d..cfa8dbdb50 100644 --- a/distribution/src/dbscripts/oracle-rac/oracle_rac_transaction_count.sql +++ b/distribution/src/dbscripts/oracle-rac/oracle_rac_transaction_count.sql @@ -1,3 +1,4 @@ +-- Related to the deprecated transaction counter feature CREATE TABLE CURRENT_STATS ( TIME_STAMP DATE NOT NULL, NODE_ID VARCHAR(40) NOT NULL, diff --git a/distribution/src/dbscripts/oracle/oracle_transaction_count.sql b/distribution/src/dbscripts/oracle/oracle_transaction_count.sql index aacef1ef4d..cfa8dbdb50 100644 --- a/distribution/src/dbscripts/oracle/oracle_transaction_count.sql +++ b/distribution/src/dbscripts/oracle/oracle_transaction_count.sql @@ -1,3 +1,4 @@ +-- Related to the deprecated transaction counter feature CREATE TABLE CURRENT_STATS ( TIME_STAMP DATE NOT NULL, NODE_ID VARCHAR(40) NOT NULL, diff --git a/distribution/src/dbscripts/postgres/postgresql_transaction_count.sql b/distribution/src/dbscripts/postgres/postgresql_transaction_count.sql index 903a8e2ebf..f0d763ef44 100644 --- a/distribution/src/dbscripts/postgres/postgresql_transaction_count.sql +++ b/distribution/src/dbscripts/postgres/postgresql_transaction_count.sql @@ -1,3 +1,4 @@ +-- Related to the deprecated transaction counter feature CREATE TABLE IF NOT EXISTS CURRENT_STATS ( TIME_STAMP DATE NOT NULL, NODE_ID VARCHAR(40) NOT NULL, diff --git a/distribution/src/resources/config-tool/deployment-full.toml b/distribution/src/resources/config-tool/deployment-full.toml index 655fda4f26..7ecc1a91f5 100644 --- a/distribution/src/resources/config-tool/deployment-full.toml +++ b/distribution/src/resources/config-tool/deployment-full.toml @@ -1098,13 +1098,6 @@ user.password = "pwd-2" [internal_apis.file_user_store] enable = false -#################### Transaction Counter Handler ############################ -[transaction_counter] -enable = true -data_source = "WSO2_COORDINATION_DB" -update_interval = 2 - - #################### Service Catalog ####################################### [[service_catalog]] apim_host = "https://127.0.0.1:9443" diff --git a/integration/mediation-tests/tests-platform/pom.xml b/integration/mediation-tests/tests-platform/pom.xml index e30198d2f3..cdef03580d 100644 --- a/integration/mediation-tests/tests-platform/pom.xml +++ b/integration/mediation-tests/tests-platform/pom.xml @@ -35,8 +35,11 @@ tests-rabbitmq tests-coordination tests-userstore - tests-transaction - + + + + + From 2849ea36a8c9bcf42f8c2382735320d66069b356 Mon Sep 17 00:00:00 2001 From: Isuru Wijesiri Date: Wed, 1 Nov 2023 15:29:59 +0530 Subject: [PATCH 2/4] Remove transaction counter GitHub workflow --- .github/workflows/transaction-tests.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/transaction-tests.yml diff --git a/.github/workflows/transaction-tests.yml b/.github/workflows/transaction-tests.yml deleted file mode 100644 index 82c330bee5..0000000000 --- a/.github/workflows/transaction-tests.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Transaction Counter tests (OpenJDK11 & MySQL) - -on: [push, pull_request] - -jobs: - ubuntu: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set up MySQL - run: | - sudo /etc/init.d/mysql start - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - distribution: 'adopt' - java-version: 11 - - name: Build in JDK 11 - run: mvn -B clean install -DskipTests --file pom.xml - - name: Transaction Counter Tests - run: mvn -B clean install --file integration/pom.xml -P transaction-tests From 38df0715bbf1eba40865c39b03415b5be6c7dc95 Mon Sep 17 00:00:00 2001 From: Isuru Wijesiri Date: Wed, 1 Nov 2023 15:49:59 +0530 Subject: [PATCH 3/4] Deprecate transaction counter --- .../management/apis/RequestCountResource.java | 3 +++ .../initializer/ServiceBusInitializer.java | 21 ------------------- .../initializer/handler/DataHolder.java | 4 +++- .../transaction/TransactionConstants.java | 4 ++++ .../transaction/TransactionCountHandler.java | 4 ++++ .../TransactionCountHandlerComponent.java | 3 ++- .../TransactionCounterException.java | 4 ++++ ...sactionCounterInitializationException.java | 4 ++++ .../transaction/security/CryptoUtil.java | 3 +++ .../transaction/store/TransactionStore.java | 3 +++ 10 files changed, 30 insertions(+), 23 deletions(-) diff --git a/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/RequestCountResource.java b/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/RequestCountResource.java index ed8c5471cc..a104960792 100644 --- a/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/RequestCountResource.java +++ b/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/RequestCountResource.java @@ -50,6 +50,9 @@ /** + * This feature is deprecated and will be removed in a future release. + * @deprecated + * * Resource for a retrieving aggregated transaction count. *

* Handles resources in the form "management/transactions/{param}" diff --git a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/ServiceBusInitializer.java b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/ServiceBusInitializer.java index 374d65d4c1..644de0b5f2 100644 --- a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/ServiceBusInitializer.java +++ b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/ServiceBusInitializer.java @@ -106,10 +106,6 @@ public class ServiceBusInitializer { private DataSourceService dataSourceService; - // This implementation of transaction counter is deprecated - // private TransactionCountHandlerComponent transactionCountHandlerComponent; - // private ExecutorService transactionCountExecutor; - @Activate protected void activate(ComponentContext ctxt) { @@ -193,14 +189,6 @@ protected void activate(ComponentContext ctxt) { synapseEnvironment.registerSynapseHandler(new SynapseExternalPropertyConfigurator()); synapseEnvironment.registerSynapseHandler(new ProxyLogHandler()); - // This implementation of transaction counter is deprecated - // boolean transactionPropertyEnabled = TransactionCountHandlerComponent.isTransactionPropertyEnabled(); - // if (transactionPropertyEnabled) { - // transactionCountHandlerComponent = new TransactionCountHandlerComponent(); - // transactionCountHandlerComponent.start(dataSourceService); - // transactionCountExecutor = Executors.newFixedThreadPool(100); - // synapseEnvironment.registerSynapseHandler(new TransactionCountHandler(transactionCountExecutor)); - // } if (log.isDebugEnabled()) { log.debug("SynapseEnvironmentService Registered"); } @@ -255,15 +243,6 @@ private String getMainSequenceName(String cappName) { @Deactivate protected void deactivate(ComponentContext ctxt) { - - // This implementation of transaction counter is deprecated - // if (Objects.nonNull(transactionCountHandlerComponent)) { - // transactionCountHandlerComponent.cleanup(); - // } - // if (Objects.nonNull(transactionCountExecutor)) { - // transactionCountExecutor.shutdownNow(); - // } - List handlers = serverManager.getServerContextInformation().getSynapseEnvironment().getSynapseHandlers(); Iterator iterator = handlers.iterator(); while (iterator.hasNext()) { diff --git a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/DataHolder.java b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/DataHolder.java index 0aae95fef9..8b5180977c 100644 --- a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/DataHolder.java +++ b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/DataHolder.java @@ -21,7 +21,9 @@ import org.wso2.micro.integrator.initializer.handler.transaction.store.TransactionStore; /** - * DataHolder class for transaction count component. + * This feature is deprecated and will be removed in a future release. + * + * @deprecated */ public class DataHolder { diff --git a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionConstants.java b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionConstants.java index 55f6b20a41..34171f9679 100644 --- a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionConstants.java +++ b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionConstants.java @@ -22,6 +22,10 @@ import java.io.File; +/** + * This feature is deprecated and will be removed in a future release. + * @deprecated + */ public class TransactionConstants { public static final String PUBLIC_KEY = System.getProperty(ServerConstants.CARBON_HOME) + File.separator diff --git a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionCountHandler.java b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionCountHandler.java index 0612458fda..14ec63862f 100644 --- a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionCountHandler.java +++ b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionCountHandler.java @@ -30,6 +30,10 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.RejectedExecutionException; +/** + * This feature is deprecated and will be removed in a future release. + * @deprecated + */ public class TransactionCountHandler extends AbstractSynapseHandler { private static final Log LOG = LogFactory.getLog(TransactionCountHandler.class); diff --git a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionCountHandlerComponent.java b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionCountHandlerComponent.java index f92def6cc8..977e99c5e4 100644 --- a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionCountHandlerComponent.java +++ b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/TransactionCountHandlerComponent.java @@ -39,7 +39,8 @@ import javax.sql.DataSource; /** - * This class represents the internal transaction count handler component. + * This feature is deprecated and will be removed in a future release. + * @deprecated */ public class TransactionCountHandlerComponent { diff --git a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/exception/TransactionCounterException.java b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/exception/TransactionCounterException.java index 04b417ec13..349e9bd553 100644 --- a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/exception/TransactionCounterException.java +++ b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/exception/TransactionCounterException.java @@ -18,6 +18,10 @@ package org.wso2.micro.integrator.initializer.handler.transaction.exception; +/** + * This feature is deprecated and will be removed in a future release. + * @deprecated + */ public class TransactionCounterException extends Exception { public TransactionCounterException(String msg, Exception e) { diff --git a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/exception/TransactionCounterInitializationException.java b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/exception/TransactionCounterInitializationException.java index b1ffc5be03..8617c685b4 100644 --- a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/exception/TransactionCounterInitializationException.java +++ b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/exception/TransactionCounterInitializationException.java @@ -18,6 +18,10 @@ package org.wso2.micro.integrator.initializer.handler.transaction.exception; +/** + * This feature is deprecated and will be removed in a future release. + * @deprecated + */ public class TransactionCounterInitializationException extends Exception { public TransactionCounterInitializationException(String msg) { diff --git a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/security/CryptoUtil.java b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/security/CryptoUtil.java index 499ea311e4..ffa5da6b69 100644 --- a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/security/CryptoUtil.java +++ b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/security/CryptoUtil.java @@ -42,6 +42,9 @@ import javax.xml.bind.DatatypeConverter; /** + * This feature is deprecated and will be removed in a future release. + * @deprecated + * * This class will provide the required methods to encrypt a given value. */ public class CryptoUtil { diff --git a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/store/TransactionStore.java b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/store/TransactionStore.java index ea561552f5..0720965495 100644 --- a/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/store/TransactionStore.java +++ b/components/org.wso2.micro.integrator.initializer/src/main/java/org/wso2/micro/integrator/initializer/handler/transaction/store/TransactionStore.java @@ -28,6 +28,9 @@ import javax.sql.DataSource; /** + * This feature is deprecated and will be removed in a future release. + * @deprecated + * * The layer which connects to the transaction data. */ public class TransactionStore { From 645d42c97ba2327d8e731b84722efd198ad24799 Mon Sep 17 00:00:00 2001 From: Isuru Wijesiri Date: Wed, 1 Nov 2023 23:01:06 +0530 Subject: [PATCH 4/4] Disable management API for transaction counter --- .../integrator/management/apis/ManagementInternalApi.java | 3 --- integration/mediation-tests/tests-platform/pom.xml | 3 --- 2 files changed, 6 deletions(-) diff --git a/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/ManagementInternalApi.java b/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/ManagementInternalApi.java index d3f42cd3fd..78a6ee2a5c 100644 --- a/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/ManagementInternalApi.java +++ b/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/ManagementInternalApi.java @@ -102,9 +102,6 @@ public ManagementInternalApi() { resourcesList.add(new ApiResourceAdapter(PREFIX_SERVER_DATA, new MetaDataResource())); resourcesList.add(new LogFilesResource(PREFIX_LOG_FILES)); - // Disabling this API as this version of transaction counter is deprecated. - // resourcesList.add(new ApiResourceAdapter(PREFIX_TRANSACTION + PATH_PARAM_TRANSACTION, new RequestCountResource())); - resourcesList.add(new ExternalVaultResource(PREFIX_EXTERNAL_VAULTS + PATH_PARAM_EXTERNAL_VAULT_NAME)); resourcesList.add(new ApiResourceAdapter(PREFIX_DATA_SOURCES, new DataSourceResource())); diff --git a/integration/mediation-tests/tests-platform/pom.xml b/integration/mediation-tests/tests-platform/pom.xml index cdef03580d..896ac75ce3 100644 --- a/integration/mediation-tests/tests-platform/pom.xml +++ b/integration/mediation-tests/tests-platform/pom.xml @@ -36,9 +36,6 @@ tests-coordination tests-userstore - - -