Replace Eclipselink with Hibernate 32/133132/2
authorliamfallon <liam.fallon@est.tech>
Thu, 2 Feb 2023 14:53:21 +0000 (14:53 +0000)
committerliamfallon <liam.fallon@est.tech>
Thu, 2 Feb 2023 17:57:53 +0000 (17:57 +0000)
Issue-ID: POLICY-4533
Change-Id: Ifa594103c81cc7d1e435df9afaefb8b57f5b091d
Signed-off-by: liamfallon <liam.fallon@est.tech>
feature-distributed-locking/src/main/feature/config/feature-distributed-locking.properties
feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockProperties.java
feature-distributed-locking/src/test/resources/feature-distributed-locking.properties
policy-management/pom.xml

index 89fc6a3..3034e23 100644 (file)
@@ -3,6 +3,7 @@
  # ONAP
 # ================================================================================
 # Copyright (C) 2018-2019, 2021-2022 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright (C) 2023 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -19,7 +20,6 @@
 ###
 
 #Database properties
-eclipselink.target-database=MySQL
 javax.persistence.jdbc.driver=org.mariadb.jdbc.Driver
 javax.persistence.jdbc.url=${envd:JDBC_URL}pooling${envd:JDBC_OPTS}
 javax.persistence.jdbc.user=${envd:SQL_USER}
index 3093ad4..4153ee8 100644 (file)
@@ -3,6 +3,7 @@
  * feature-distributed-locking
  * ================================================================================
  * Copyright (C) 2018-2019, 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,7 +24,6 @@ package org.onap.policy.distributed.locking;
 import java.util.Properties;
 import lombok.Getter;
 import lombok.Setter;
-import org.eclipse.persistence.config.PersistenceUnitProperties;
 import org.onap.policy.common.utils.properties.BeanConfigurator;
 import org.onap.policy.common.utils.properties.Property;
 import org.onap.policy.common.utils.properties.exception.PropertyException;
@@ -34,13 +34,15 @@ import org.onap.policy.common.utils.properties.exception.PropertyException;
 public class DistributedLockProperties {
     public static final String PREFIX = "distributed.locking.";
 
-    public static final String DB_DRIVER = PersistenceUnitProperties.JDBC_DRIVER;
-    public static final String DB_URL = PersistenceUnitProperties.JDBC_URL;
-    public static final String DB_USER = PersistenceUnitProperties.JDBC_USER;
-    public static final String DB_PASS = PersistenceUnitProperties.JDBC_PASSWORD;
+    // @formatter:off
+    public static final String DB_DRIVER = "javax.persistence.jdbc.driver";
+    public static final String DB_URL    = "javax.persistence.jdbc.url";
+    public static final String DB_USER   = "javax.persistence.jdbc.user";
+    public static final String DB_PASS   = "javax.persistence.jdbc.password";
     public static final String EXPIRE_CHECK_SEC = PREFIX + "expire.check.seconds";
     public static final String RETRY_SEC = PREFIX + "retry.seconds";
     public static final String MAX_RETRIES = PREFIX + "max.retries";
+    // @formatter:on
 
     /**
      * Database driver.
index b34ac94..75a365f 100644 (file)
@@ -3,6 +3,7 @@
  # feature-distributed-locking
 # ================================================================================
 # Copyright (C) 2018-2019, 2021 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright (C) 2023 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,7 +19,6 @@
 # ============LICENSE_END=========================================================
 ###
 
-eclipselink.target-database=Auto
 javax.persistence.jdbc.driver=org.h2.Driver
 javax.persistence.jdbc.url=jdbc:h2:mem:pooling
 javax.persistence.jdbc.user=user
index 19fee3e..fa93fa1 100644 (file)
         applications usage
         -->
 
-        <dependency>
-            <groupId>org.eclipse.persistence</groupId>
-            <artifactId>eclipselink</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.eclipse.persistence</groupId>
-            <artifactId>org.eclipse.persistence.jpa</artifactId>
-        </dependency>
-
         <dependency>
             <groupId>org.mariadb.jdbc</groupId>
             <artifactId>mariadb-java-client</artifactId>