summaryrefslogtreecommitdiffstats
path: root/adapters/mso-requests-db-adapter
diff options
context:
space:
mode:
authorSmokowski, Steven <steve.smokowski@att.com>2019-12-03 07:51:11 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-12-03 07:51:12 -0500
commit2e0f12e3a3e560f0403ca2c589067bf43b9b7952 (patch)
tree47db9cd8c49b077bca47c5ea922904129a37f664 /adapters/mso-requests-db-adapter
parenta849c237fe71f7dee316dd87f5d385cf4e2a38b6 (diff)
Update Shedlock to proper version for
Update Shedlock to proper version for compatibility Update Shedlock to proper version for compatibility Update Shedlock to proper version for compatibility Update Shedlock to proper version for compatibility Update Shedlock to proper version for compatibility Issue-ID: SO-2550 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I5378d1e964b5eaa88b9ac33ef3759d6120c76150
Diffstat (limited to 'adapters/mso-requests-db-adapter')
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java10
1 files changed, 2 insertions, 8 deletions
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();
- }
}