summaryrefslogtreecommitdiffstats
path: root/feature-session-persistence/src
AgeCommit message (Collapse)AuthorFilesLines
2022-03-01Remove features-session-persistence and eelfjhh21-4131/+0
These are unused. Issue-ID: POLICY-3922 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I9ef6af27d4d5ed5667a60db841a82b4d492f79f4
2021-08-26Fix sonars in drools-pdpJim Hahn1-5/+5
Fixed sonars: - use "var" - override "equals" - unused imports Also changed some of the JPA queries to make them typed queries. Issue-ID: POLICY-3289 Change-Id: Ib3a00be322d8d00ba492673708439cacfe2c7fc4 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-10Add SQL_PORT configurationjhh1-3/+3
Issue-ID: POLICY-3533 Change-Id: I03fc41332d4739d5a4d6cee5f86ba823714336d6 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-08-05Use lombok in drools-pdp #2Jim Hahn7-113/+32
Updated feature-session-persistence thru drools-domains. Issue-ID: POLICY-3397 Change-Id: I0b1c6da8b2301c00dd792675e8cf1f49888edb9f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-18Fix new checkstyle issues in drools-pdpJim Hahn1-17/+16
The new version of checkstyle identified new issues. Fixed those. Also addressed sonar "var" issues. Issue-ID: POLICY-3289 Change-Id: I3a18d3988202dca6f3c87f2aa1810bf803a9d14d Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-09Upgrade dependenciesJim Hahn3-9/+13
Changes to eclipselink are incompatible with javax-persistence-api so removed the latter. Also added target-database property. Also replaced string constants with eclipselink constants. Per review comments, moved target-database values to property files. Issue-ID: POLICY-3005 Change-Id: I043203a952d54406a5996c1e8b5ba8936bf558c0 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-25Address more sonars in drools-pdpJim Hahn2-18/+8
Addressed the following sonars: - either log or rethrow - call "remove()" for thread-local-storage - use assertEquals - only one method call in exception test - swap arguments in assertEquals - add assertion to assertThatThrownBy() - explain @Ignore Also addressed eclipse warnings: - unused fields and methods Issue-ID: POLICY-2616 Change-Id: I6590c0d2b103885bc933014d48bf5fd92401cd80 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-06Checkstyle fixes to drools-pdpJim Hahn1-3/+1
Issue-ID: POLICY-2696 Change-Id: I7f80737c52e3f16e03803118d92411e4ac39c5fb Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-02drools-pdp sonar fixTaka Cho1-15/+16
most of changes are assert statement Issue-ID: POLICY-2616 Change-Id: I3bd3076115d28d8cfabcbe0859cc4b21085e1394 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-19Address checkstyle version issues in drools-pdpJim Hahn6-16/+3
Also added serializationId to several classes to address eclipse warnings. Issue-ID: POLICY-2188 Change-Id: I3df5e8abaad8da9261c0d5cd19a93ed68dceb870 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-06Address sonar issues in drools-pdpJim Hahn3-40/+35
Addressed the following sonar issues: - add "final" to public static fields - commented code; some were bogus - just updated the comments so sonar is happy - use "{}" instead of string concatenation - junit should assert something - when using logger, invoke compute-intensive tasks conditionally - use superclass name instead of subclass name to access static fields - don't always return the same value - remove "transient" from fields of classes that aren't Serializable - don't nest try/catch blocks - use appropriate class name in Logger.getLogger() - use Predicate<T> instead of Function<T,Boolean> - remove unused parameters from private methods - either log or throw - remove duplicate methods - use remove() TLS instead of set(null) - null check is implicit in instanceof check - do something with return value - don't use volatile - don't return "null" list; used Optional instead - add no-arg constructor to non-Serializable superclass - add callSuper=true for EqualsAndHashCode - don't declare "throws XXX" where XXX is a subclass of RuntimeException - remove serialVersionUID field if the class isn't Serializable Also addressed some eclipse warnings: - unused fields - suppress generic typic cast warnings Issue-ID: POLICY-2305 Change-Id: I906d5bf71c1f86531423e23b3667a585cdba45e1 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-01-13policy/drools-pdp jdk11 upgradesHockla, Ali (ah999m)3-8/+9
Issue-ID: POLICY-1589 Change-Id: I0ed05c6e471a7da6658e02a4ba3115d3a117cedd Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2019-11-08Miscellaneous code clean upjhh4-32/+27
Issue-ID: POLICY-2203 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I5731d4636bd2aaecbc486406298bcba1b19e8f4d Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-08-13Fix sonar issues in drools-pdpJim Hahn1-18/+19
Address sonar issue, "Move constants to a class or enum", by moving them from interfaces to classes: ActiveStandbyFeatureApi StateManagementFeatureApi PolicyResourceLockFeatureApi PolicySessionFeatureApi DroolsController DroolsControllerFeatureApi PolicyControllerFeatureApi PolicyEngineFeatureApi HealthCheck SystemPersistence EventProtocolCoder PolicyController PolicyEngine TestTransaction MdcTransaction Address sonar issue, "Move constants to a class or enum", by change the interface to a class: DroolsProperties Address sonar issue, "Override the "equals" method in this class", by adding equals & hashCode to: DroolsPdpEntity DroolsPdpImpl Use lombok for a number of getters & setters. Address sonar issue, "Define a constant instead of duplicating this literal" in: DroolsPdpsElectionHandler JpaDroolsPdpsConnector MavenDroolsController GenericEventProtocolCoder GsonProtocolCoderToolset RestManager Address sonar issue, "Remove the parentheses around the parameter" in: MavenDroolsController Address sonar issue, "Replace this lambda with a method reference" in: LifecycleFsm Address sonar issue, "Move this constructor to comply with Java Code Conventions" in: LifecycleStateRunning Address sonar issue, "Replace this 'switch' statement by 'if' statements to increase readability", as specified in: PolicyEngineManager Address sonar issue, "Rename field to prevent any misunderstanding/clash with field" in: MdcTransactionImpl Address sonar issue, "Either log or rethrow this exception", in: RestManager Address sonar issue, "Rename this constant name to" uppercase, by replacing enums with static lists in: RestManager Addressed review comments: Fixed license dates. Renamed getSiteName/setSiteName methods to getSite/setSite in the interface to match the field names in the implementation classes. Renamed *Instance classes to *Constants. Next round of review comments. Change-Id: I1c26af9f194833dd773f2b25dc5f60cde163201c Issue-ID: POLICY-1968 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-16Fix checkstyle issues in policy-coreJim Hahn2-2/+2
Also deleted the checkstyle suppression file. Change-Id: I93e9f9154b614b56f7826ec978e1a99bd9369348 Issue-ID: POLICY-1907 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-11Fix checkstyle issues in policy-managementJim Hahn2-3/+3
Also deleted the checkstyle suppression file. Moved classes into their own source files per checkstyle. Change-Id: I586223aac0e5b7623cfd7b0acfceca4742ecc013 Issue-ID: POLICY-1908-mgmt-style Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-21Moving hard install config to environment varsJorge Hernandez1-4/+4
Change-Id: I01e0cf2e2399ec81337961e0a2b3a349c34f55c4 Issue-ID: POLICY-1517 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2018-11-29Remove Factory from various drools-pdp classesJim Hahn2-392/+366
Also merged changes from 'Rename test classes in drools-pdp'. Change-Id: I4d0a3a1b0b5523eadf38d1edb5aa86c404b69d19 Issue-ID: POLICY-1288 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-10-02Add junit coverage to drools-pdpJim Hahn2-2/+4
Added coverage to distributed locking. Added coverage to test-transaction - still more to do. Added coverage to healthcheck - still more to do. Also fixed "code smell" in pooling. Also fixed "code smell" in session persistence. Fixed typo in comment. Removed unneeded setUp() method from test. Fixed new checkstyle errors. Fixed another new checkstyle error. Change-Id: I0d2ab13fcbd64486af88affb02e114e624c6a3d1 Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-10-01Set drools-pdp checkstyle configPamela Dragosh3-22/+35
Fixed last remaining checkstyle issues along with setting the pom.xml to the correct path setting. Fixed forbidden summary fragments, not allowed to prepend summary with "This method returns" Issue-ID: POLICY-1153 Change-Id: I267842080494132a7b5507731e14f027a3f6fe44 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-17don't begin new transactionJim Hahn2-109/+248
Persistence code was not checking to see if a transaction was already in progress before beginning a transaction. Fix checkstyle issue with comments and parameter for EntityMgrException. Restore other checkstyle fixes. More checkstyle fixes. Rename some variables. Change-Id: Ic820944781571ba2ef411cb86d12fa32fb206124 Issue-ID: POLICY-1106 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-13Fix checkstyle for features submodules.Pamela Dragosh15-3038/+2966
These are the remaining submodules that have checkstyle. Pretty clean compile after this. There were a couple of sonar fixes in there also. Issue-ID: POLICY-882 Change-Id: I8191ea1aa261f4a7b9d3d21c108572fd31db1b8c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-02-20Sonar fixes to drools-pdpJim Hahn3-78/+82
Fixed most of the instances of the following sonar issues: Moved array designator Used diamond operator Changed System.out/err to use a logger Changed several Thread.sleep() in test code to a single sleep() Useless assignments Replaced comparison with "" to string.isEmpty() Merged if's Replaced ArrayList with List in method returns Reordered type modifiers Reordered constructor methods Defined constants for literals, or replaced them with method calls Removed "throws Xxx" for subclasses of RuntimeException Combined identical "catch" blocks Re-interrupted the current thread after catching an InterruptedException Removed tests against the literal "false" Fix indentation of new makeTopicOperError() method. Fix exception variable name in new methods, logNoUebEncoder() and logNoDmaapEncoder(). Change-Id: Iddae5210553662f733b67333b372dec8c3fe2c94 Issue-ID: POLICY-336 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-02-14Replace bitronix and eclipselink in persistenceJim Hahn16-1100/+1349
Replaced bitronix transaction manager, which is not intended for production, with jboss transaction manager. Eliminated eclipselink so that only hibernate is used for persistence for both JPA and drools-persistence. Added more test cases to EntityMgrTrans to provide coverage for various exception types. Moved object store to features/session-persistence/jta. Wrapped RuntimeException in specific type. Modified test to throw specific exception type. Converted GenSchema from an @Test to a main(). Logged caught exceptions in junit tests. Change-Id: I4b02efc8da43d20b2dbb3c0b25adc382e80474ec Issue-ID: POLICY-191 Signed-off-by: Jim Hahn <jrh3@att.com>
2017-10-09sessioninfo to mediumblobKevin McKiou1-1/+1
The sessioninfo is currently defined as a blob which is too small in practice. This changes the definition to a mediumblob. Issue-ID: POLICY-301 Change-Id: I482cf08a4c4a34c4e1b7e07876984e5e3b8b1c63 Signed-off-by: Kevin McKiou <km097d@att.com>
2017-09-22Merge "Added @Override method"Pamela Dragosh2-17/+18
2017-09-22Merge "Added diamond symbol on RHS"Pamela Dragosh1-0/+2
2017-09-21Addition of Active-Standby FeatureKevin McKiou1-13/+20
Patch 1: Adds the active-standby feature to drools-pdp. This feature provides the state control of the drools-pdp nodes controlling failover with a site and across sites. Patch 2: Resolve merge conflict in packages/install/pom.xml and pom.xml. Patch 3: Resolved comments from Pamela Dragosh and Jorge Hernandez. Issue-ID: POLICY-156 Change-Id: I922b3d5d8a464006e9675924bcbc7409d68c08d5 Signed-off-by: Kevin McKiou <km097d@att.com>
2017-09-21Added @Override methodrama-huawei2-17/+18
Added diamond symbol on RHS Removed useless parentheses Issue-ID: POLICY-239 Change-Id: Ie20319a5a7298c70a18cc3773ec47f235dbdae41 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-21Added diamond symbol on RHSrama-huawei1-0/+2
Removed useless parentheses Issue-ID: POLICY-239 Change-Id: Icad445f49cc619d71f71ef913f2592d5c7ebf29c Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-15Merge "Addition of State Management Feature"Pamela Dragosh2-7/+1
2017-09-15Fix sonar related to persistence-featurePamela Dragosh1-6/+6
Sonar blocker for catchable: I am not sure why this is wrapped with an exception. Changing try-catch to use Exception | LinkageError per Jorge/Ralph. Sonar critical for logging exceptions. Sonar critical for casting to Long and reinterrupting thread. Change-Id: I44d46f005d9aa30c434c22e479034107055277ce Issue-ID: POLICY-195 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-09-14Addition of State Management FeatureMagnusen, Drew (dm741q)2-7/+1
Patch 1:This commit adds the feature to provide node state management. There are also a couple of very minor cleanup items in feature-session-persistence which came up during review and testing. Patch 2: Cleaned up some logging statements and exceptions per comments by Pam Dragosh. Patch 3: Clean up per comments from Jorge Hernandez. Patch4: Added a default to ignoreErrors in RepositoryAudit. Patch 5: Rebase. Patch 6: Removed api-state-management/.gitignore Issue-ID: POLICY-155 Change-Id: I4fbfa33314d488ff46764931ca965f802b6a26d5 Signed-off-by: Kevin McKiou <km097d@att.com>
2017-08-24rename scripts and clean up eclipse warningsJorge Hernandez1-2/+0
rename scripts to follow convention that executable scripts should not have file extensions. clean up some warnings in eclipse Issue-ID: POLICY-162 Change-Id: I82be87925c3a8264381795535d33cee04924ae92 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-23Add access.log to jetty serverjrh31-0/+44
Added a single line to the code that creates the jetty server so that it will log messages in access.log format. Also added lines to various logback.xml files to actually write the output from the jetty server to the access.log. Made some revisions per comments: - removed spaces around parameters - added "Out" suffix - changed suffix of archived files - changed size to 1MB Modified logback*.xml files to include jetty "access log" content in the already-existing network.log. Issue-Id: POLICY-161 Change-Id: I3e3769c06a22aaffea0e09abbec3387cc62f246f Signed-off-by: jrh3 <jrh3@att.com>
2017-08-22Add feature-session-persistenceKevin McKiou23-0/+3886
This commit adds the feature-session-persistence module which will persist drools session data to allow stateful transactions which can persist across node restarts and failovers. It also picks up recent changes to the master branch to avoid merge conflicts. Issue-ID: POLICY-133 Change-Id: Ifdcd8280ea6df07db79562f1b01fa90296a8b878 Signed-off-by: Kevin McKiou <km097d@att.com>