summaryrefslogtreecommitdiffstats
path: root/adapters/mso-requests-db-adapter/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-requests-db-adapter/src/main')
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java5
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java19
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java10
-rw-r--r--adapters/mso-requests-db-adapter/src/main/resources/db/migration/V6.6__UpdateRequestProcessingData.sql9
4 files changed, 24 insertions, 19 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
index f4a9f711fd..110fc6c03e 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,6 +31,7 @@ import org.onap.so.db.request.beans.ResourceOperationStatus;
/**
* MSO Request DB Adapter Web Service
*/
+@Deprecated
@WebService(name = "RequestsDbAdapter", targetNamespace = "http://org.onap.so/requestsdb")
public interface MsoRequestsDbAdapter {
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
index 6ecf5dc3f0..085a255948 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
@@ -10,9 +10,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,6 +45,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;
+@Deprecated
@WebService(serviceName = "RequestsDbAdapter",
endpointInterface = "org.onap.so.adapters.requestsdb.MsoRequestsDbAdapter",
targetNamespace = "http://org.onap.so/requestsdb")
@@ -129,7 +130,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
} catch (Exception e) {
String error = "Error retrieving MSO Infra Requests DB for Request ID " + requestId;
logger.error(error, e);
- throw new MsoRequestsDbException(error, ErrorCode.BusinessProcesssError, e);
+ throw new MsoRequestsDbException(error, ErrorCode.BusinessProcessError, e);
}
}
@@ -155,7 +156,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
} catch (Exception e) {
String error = "Error retrieving MSO Infra Requests DB for Request ID " + requestId;
logger.error(error, e);
- throw new MsoRequestsDbException(error, ErrorCode.BusinessProcesssError, e);
+ throw new MsoRequestsDbException(error, ErrorCode.BusinessProcessError, e);
}
return request;
}
@@ -183,7 +184,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
/**
* update operation status <br>
- *
+ *
* @param serviceId
* @param operationId
* @param operationType
@@ -253,7 +254,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
/**
* init the operation status of all the resources <br>
- *
+ *
* @param serviceId the service Id
* @param operationId the operation Id
* @param operationType the operationType
@@ -284,7 +285,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
/**
* get resource operation status <br>
- *
+ *
* @param serviceId
* @param operationId
* @param resourceTemplateUUID
@@ -304,7 +305,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
/**
* update resource operation status <br>
- *
+ *
* @param serviceId
* @param operationId
* @param resourceTemplateUUID
@@ -340,7 +341,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
/**
* update service operation status when a operation resource status updated <br>
- *
+ *
* @param operStatus the resource operation status
* @since ONAP Amsterdam Release
*/
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java
index 3a14b2ff84..0272bab1a1 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java
@@ -22,7 +22,6 @@
package org.onap.so.adapters.requestsdb.application;
-import java.time.Duration;
import javax.sql.DataSource;
import org.onap.logging.filter.base.Constants;
import org.onap.logging.filter.base.ONAPComponents;
@@ -34,8 +33,7 @@ import org.springframework.jmx.support.RegistrationPolicy;
import org.springframework.scheduling.annotation.EnableScheduling;
import net.javacrumbs.shedlock.core.LockProvider;
import net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider;
-import net.javacrumbs.shedlock.spring.ScheduledLockConfiguration;
-import net.javacrumbs.shedlock.spring.ScheduledLockConfigurationBuilder;
+import net.javacrumbs.shedlock.spring.annotation.EnableSchedulerLock;
/**
* @since Version 1.0
@@ -43,6 +41,7 @@ import net.javacrumbs.shedlock.spring.ScheduledLockConfigurationBuilder;
*/
@SpringBootApplication(scanBasePackages = {"org.onap.so", "org.onap.logging.filter"})
@EnableScheduling
+@EnableSchedulerLock(defaultLockAtMostFor = "120s")
@EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)
public class MSORequestDBApplication {
@@ -66,10 +65,5 @@ public class MSORequestDBApplication {
return new JdbcTemplateLockProvider(dataSource);
}
- @Bean
- public ScheduledLockConfiguration taskScheduler(LockProvider lockProvider) {
- return ScheduledLockConfigurationBuilder.withLockProvider(lockProvider).withPoolSize(10)
- .withDefaultLockAtMostFor(Duration.ofMinutes(10)).build();
- }
}
diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V6.6__UpdateRequestProcessingData.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V6.6__UpdateRequestProcessingData.sql
new file mode 100644
index 0000000000..70d1d3fd46
--- /dev/null
+++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V6.6__UpdateRequestProcessingData.sql
@@ -0,0 +1,9 @@
+use requestdb;
+
+UPDATE request_processing_data
+SET IS_DATA_INTERNAL = 1
+WHERE TAG = 'BPMNExecutionData';
+
+UPDATE request_processing_data
+SET IS_DATA_INTERNAL = 0
+WHERE TAG = 'StackInformation' OR TAG = 'pincFabricConfigRequest'; \ No newline at end of file