aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-12-10 13:28:19 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-10 13:28:19 +0000
commit0851fa868eb8cf7dd5ba121ecc5de58cb7631898 (patch)
tree1d561dcb9b2b6c9a51701c99380ccd24e03e25bf
parent15b9f3c6cbb69a243e4fd98add2cc2aebe83daf4 (diff)
parent2e0f12e3a3e560f0403ca2c589067bf43b9b7952 (diff)
Merge "Update Shedlock to proper version for"
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java10
-rw-r--r--pom.xml4
2 files changed, 4 insertions, 10 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();
- }
}
diff --git a/pom.xml b/pom.xml
index 76e5acdfa4..c1b778fcc9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -843,12 +843,12 @@
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-spring</artifactId>
- <version>0.18.2</version>
+ <version>4.0.0</version>
</dependency>
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-provider-jdbc-template</artifactId>
- <version>0.18.2</version>
+ <version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>