summaryrefslogtreecommitdiffstats
path: root/integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagement.java
AgeCommit message (Collapse)AuthorFilesLines
2018-03-20Removed checkstyle warningsmmis1-905/+930
Removed checkstyle warnings in policy/common/im Issue-ID: POLICY-695 Change-Id: I32b4797249386c0d1bd0f50792880a1759503a67 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-03-16Fixing 12 reported bugs in Sonar for policy/commoneikrwaq1-151/+132
Change-Id: I7bf453828f7a62070e7a73362798e6f2d4806b2f Issue-ID: POLICY-661 Signed-off-by: eikrwaq <waqas.ikram@ericsson.com>
2018-02-16Fix more generic exceptions in commonJim Hahn1-13/+13
Fixed a few more generic exceptions in integrity-audit and integrity-monitor. Fixed license dates. Change-Id: Ibbc21ae5f853896e0d3e416e33b5ea2a13672f62 Issue-ID: POLICY-246 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-02-13Add test coverage to integrity-monitorJim Hahn1-271/+140
Removed "test" from package name. Refactored tests, creating common IntegrityMonitorTestBase. Turned log/print statements into assertEquals in StateTransitionTest. Turned log/print statements into assertEquals in StateManagementTest. Modified AllSeemsWellTest to use IntegrityMonitorTestBase. Modified IntegrityMonitorTest to use IntegrityMonitorTestBase. Added several hooks to IntegrityMonitor to control timers at a finer granularity. Added hooks to IntegrityMonitor to control the FPManager thread. Remove hooks for refresh timer, as property suffices. Added assertException() and assertNoException() methods to IntegrityMonitorTestBase, and then replaced most "try/catch" blocks with calls to those methods. Updated StateManagement to close EntityManagers. Modify pom to remove scope from utils dependency. Fix some comments and remove an unneeded EntityTransaction variable. Change-Id: Ic0789d26f985a40a35f618343fa4e88aa473b2b3 Issue-ID: POLICY-582 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-01-05StateManagement EntityManager CreationKevin McKiou1-5/+22
Patch 1: This change modifies StateManagement methods that use transactions so that an EntityManager is created each time the method is called. This eliminates issues with EntityManager transactions being shared across threads causing errors when multiple threads are active. Issue-ID: POLICY-518 Change-Id: I071660a530de610ec56af82347b92496f87bf4e1 Signed-off-by: Kevin McKiou <km097d@att.com>
2017-11-21IntegrityMonitor check before commitKevin McKiou1-14/+42
Under some conditions the JPA transaction may be already closed when commit is called in StateManagement. Surround it with a check to see if the transaction is active, so it will not generate an error in the log. Issue-ID: POLICY-484 Change-Id: Id54585e68361a0be9ae8afd7e9ccba2f7eadfe5f Signed-off-by: Kevin McKiou <km097d@att.com>
2017-09-14Changed logger to slf4jMagnusen, Drew (dm741q)1-97/+201
Changed all instances of Sys.out or PolicyLogger to slf4j. Issue-ID: POLICY-178 Change-Id: Ia91af1deb18a9b5c466f6f8a6c546c17c54e14ad Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-09-12Fix sonar critical associated with loggingPamela Dragosh1-25/+6
Addressing the following sonar critical: Use a logger to log this exception Either log or rethrow this exception It does not hurt to simply do these as well as clean out lines of code that dump to Sys.out via e.printStackTrace. Issue-ID: POLICY-195 Change-Id: Ibc328094a0653b7baa04778298e4a69955105ea3 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-08-15Resolve major/critical issues in integrity-monitorMagnusen, Drew (dm741q)1-30/+29
Resolved major and critical sonar issues in integrity-monitor module. Issue-ID: [POLICY-96] Change-Id: If1da196134a73535668d42f429d647fc819ecaee Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-07-31[POLICY-71] replace openecomp for policy-commonGuo Ruijing1-0/+970
Change-Id: I3241f5d1f0234043b4dff718eda1ffdc48052276 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>