summaryrefslogtreecommitdiffstats
path: root/feature-session-persistence/src
diff options
context:
space:
mode:
Diffstat (limited to 'feature-session-persistence/src')
-rw-r--r--feature-session-persistence/src/assembly/assemble_zip.xml2
-rw-r--r--feature-session-persistence/src/main/feature/db/sessionpersistence/sql/18020-sessionpersistence.upgrade.sql6
-rw-r--r--feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java12
3 files changed, 7 insertions, 13 deletions
diff --git a/feature-session-persistence/src/assembly/assemble_zip.xml b/feature-session-persistence/src/assembly/assemble_zip.xml
index 1cc3ce5a..8a315960 100644
--- a/feature-session-persistence/src/assembly/assemble_zip.xml
+++ b/feature-session-persistence/src/assembly/assemble_zip.xml
@@ -24,7 +24,7 @@
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <id>session-persistence</id>
+ <id>feature-session-persistence</id>
<formats>
<format>zip</format>
</formats>
diff --git a/feature-session-persistence/src/main/feature/db/sessionpersistence/sql/18020-sessionpersistence.upgrade.sql b/feature-session-persistence/src/main/feature/db/sessionpersistence/sql/18020-sessionpersistence.upgrade.sql
index 0e980968..5d4993fe 100644
--- a/feature-session-persistence/src/main/feature/db/sessionpersistence/sql/18020-sessionpersistence.upgrade.sql
+++ b/feature-session-persistence/src/main/feature/db/sessionpersistence/sql/18020-sessionpersistence.upgrade.sql
@@ -51,10 +51,4 @@ WORKITEMBYTEARRAY BLOB,
PRIMARY KEY (WORKITEMID)
);
-CREATE TABLE IF NOT EXISTS sessionpersistence.SESSIONINFO_ID_SEQ (next_val bigint) engine=MyISAM;
-INSERT INTO sessionpersistence.SESSIONINFO_ID_SEQ (next_val) SELECT 1 WHERE NOT EXISTS (SELECT * FROM sessionpersistence.SESSIONINFO_ID_SEQ);
-
-CREATE TABLE IF NOT EXISTS sessionpersistence.WORKITEMINFO_ID_SEQ (next_val bigint) engine=MyISAM;
-INSERT INTO sessionpersistence.WORKITEMINFO_ID_SEQ (next_val) SELECT 1 WHERE NOT EXISTS (SELECT * FROM sessionpersistence.WORKITEMINFO_ID_SEQ);
-
set foreign_key_checks=1; \ No newline at end of file
diff --git a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java
index e6603b68..b48690b0 100644
--- a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java
+++ b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java
@@ -732,7 +732,7 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine
* before firing rules again. This is a "half" time, so that
* we can multiply it by two without overflowing the word size.
*/
- long halfMaxSleepTime = 5000 / 2;
+ long halfMaxSleepTime = 5000L / 2L;
/**
* Constructor - initialize variables and create thread
@@ -819,6 +819,7 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine
} catch (InterruptedException e) {
logger.error("stopThread exception: ", e);
+ Thread.currentThread().interrupt();
}
// verify that it's done
@@ -866,11 +867,9 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine
// no rules fired -- increase poll delay
sleepTime = 2 * Math.min(halfMaxSleepTime, sleepTime);
}
-
- } catch (Throwable e) {
- logger.error("startThread exception: ", e);
- }
-
+ } catch (Exception | LinkageError e) {
+ logger.error("Exception during kieSession.fireAllRules", e);
+ }
try {
if(stopped.await(sleepTime, TimeUnit.MILLISECONDS)) {
@@ -879,6 +878,7 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine
} catch (InterruptedException e) {
logger.error("startThread exception: ", e);
+ Thread.currentThread().interrupt();
break;
}
}