aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/eventmanager/src/main/java')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerImpl.java9
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerParams.java14
2 files changed, 6 insertions, 17 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerImpl.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerImpl.java
index 16cf527d5..1f6dfdca3 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerImpl.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerImpl.java
@@ -3,7 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -85,14 +85,14 @@ public class OperationHistoryDataManagerImpl implements OperationHistoryDataMana
/**
* Number of records that have been inserted into the DB by this data manager
- * instance, whether or not they were committed.
+ * instance, whether they were committed.
*/
@Getter
private long recordsInserted = 0;
/**
* Number of records that have been updated within the DB by this data manager
- * instance, whether or not they were committed.
+ * instance, whether they were committed.
*/
@Getter
private long recordsUpdated = 0;
@@ -317,7 +317,6 @@ public class OperationHistoryDataManagerImpl implements OperationHistoryDataMana
props.put("jakarta.persistence.jdbc.url", params.getUrl());
props.put("jakarta.persistence.jdbc.user", params.getUserName());
props.put("jakarta.persistence.jdbc.password", params.getPassword());
- props.put("hibernate.dialect", params.getDbHibernateDialect());
return props;
}
@@ -337,6 +336,8 @@ public class OperationHistoryDataManagerImpl implements OperationHistoryDataMana
// the following may be overridden by junit tests
protected EntityManagerFactory makeEntityManagerFactory(String opsHistPu, Properties props) {
+ logger.info("Starting persistence unit {}", opsHistPu);
+ logger.info("Properties {}", props);
return Persistence.createEntityManagerFactory(opsHistPu, props);
}
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerParams.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerParams.java
index 054f4b1c1..1ea83761c 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerParams.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerParams.java
@@ -3,7 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,7 +42,6 @@ import org.onap.policy.common.parameters.annotations.NotNull;
public class OperationHistoryDataManagerParams {
public static final String DEFAULT_PU = "OperationsHistoryPU";
public static final String DEFAULT_DRIVER = "org.mariadb.jdbc.Driver";
- public static final String DEFAULT_TYPE = "MariaDB";
@NotBlank
private String url;
@@ -58,9 +57,6 @@ public class OperationHistoryDataManagerParams {
@Builder.Default
private String driver = DEFAULT_DRIVER;
- @Builder.Default
- private String dbType = DEFAULT_TYPE;
-
/**
* Maximum number of records that can be waiting to be inserted into the DB. When the
* limit is reached, the oldest records are discarded.
@@ -86,12 +82,4 @@ public class OperationHistoryDataManagerParams {
public ValidationResult validate(String resultName) {
return new BeanValidator().validateTop(resultName, this);
}
-
- /**
- * Return the Hibernate dialect for the database type.
- * @return the dialect
- */
- public Object getDbHibernateDialect() {
- return "org.hibernate.dialect." + dbType + "Dialect";
- }
}