aboutsummaryrefslogtreecommitdiffstats
path: root/feature-distributed-locking
AgeCommit message (Collapse)AuthorFilesLines
2022-11-22Update snapshot and/or references of policy/drools-pdp to latest snapshotskohnliamfallon1-1/+1
policy/drools-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4461 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I91d15c71ad449c483ec92fe22e035f8481a6802a
2022-11-01Remove lombok public access in locking gettersjhh1-2/+2
Issue-ID: POLICY-4428 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I3c0be2c6e5ad4b723424f20eb39acb654605b235 (cherry picked from commit 32cbb83fdb7eece88a458585829119d1663994ab)
2022-10-21Update snapshot and/or references of policy/drools-pdp to latest snapshotsliamfallon1-1/+1
policy/drools-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4408 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Ibe0ef73872094fb12b23233dd7828da24d715254
2022-10-19Support optional cluster name in policy enginejhh4-36/+46
This allows also for correlation with running pod hostnames in the case of multiple drools pdp flavors coexist. Issue-ID: POLICY-4403 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I81affeeec622e6c0e9627651bf34c0775a796827 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2022-09-23Update snapshot and/or references of policy/drools-pdp to latest snapshotsliamfallon1-1/+1
policy/drools-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4343 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Iea8f1e16c283647eecb9e8efab8e7098b2f7c294
2022-09-16Fix minor warnings in codeliamfallon1-1/+0
Issue-ID: POLICY-4045 Change-Id: I3ee1bce6f71c46a5b6ca819316b210a2a2ff8993 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-08-24made lock sql compatible with both mysql/mariadbjhh1-2/+2
Issue-ID: POLICY-4329 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I784a3f8456a201262056803169204d499a4a68a2 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2022-07-12Upgrade commons-dbcp2 and commons-pool2 versionsjhh1-3/+3
Issue-ID: POLICY-4281 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I516cc54a607c0f3d1665f4a966618282045ae60c
2022-06-20Allow for flexible specification of JDBC driverjhh1-3/+3
Issue-ID: POLICY-4177 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: If33934f79dbe41200e57816781089c63f05b8d67
2022-05-03Set snapshot and/or references of policy/drools-pdp for new releaseliamfallon1-1/+1
policy/drools-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4073 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I7912b90be6d5d995cd9d6693dc1ce8f3a0716cdc Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-04-28Update snapshot and/or references of policy/drools-pdp to latest snapshotsliamfallon1-1/+1
policy/drools-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4089 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I04e9d2a40faeede098a10d2f71741e850659bbd6
2022-04-12Update snapshot and/or references of policy/drools-pdp to latest snapshotsliamfallon1-1/+1
policy/drools-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4089 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Iee8e460c80dbaa4a4df4529aa068e1cfcc81dfcb
2022-03-11Update snapshot and/or references of policy/drools-pdp to latest snapshotsliamfallon1-1/+1
policy/drools-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-3982 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Ic6bfe8855771af2e5c1ac9bd5642e4771fe5f5f8
2021-11-29Update snapshot of policy/drools-pdp to 1.10.1-SNAPSHOTliamfallon1-1/+1
*** This commit is generated by a PF release script *** policy/drools-pdp is update from 1.10.0-SNAPSHOT to 1.10.1-SNAPSHOT Issue-ID: POLICY-3827 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Id6f59849b88c0f98d874cf853f249738e784316f
2021-10-14Bump policy/drools-pdp to Jakarta 1.10.0-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3696 Change-Id: Id7723b73aa472c45271e6e1488cc3f0f08349924 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-10-14Bump policy/drools-pdp to 1.9.2-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3696 Change-Id: I8fc7e6a7c6e9a2f20409a84a1c517e49c9468eb8 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-09-15Bump versions to 1.9.1-SNAPSHOTjhh1-1/+1
Issue-ID: POLICY-3587 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I6d38adccfbee1274ce416cfadbfe306343f5d607
2021-08-26Fix sonars in drools-pdpJim Hahn1-19/+15
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-06-29Use unique name in drools PdpMessagesJim Hahn2-15/+14
Also modified distributed locking to use the unique name, in case the DB is shared. Issue-ID: POLICY-3410 Change-Id: I046a9ffdcb62f3d84d7d388a1e64bcf025fbbf75 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-07Use sh instead of ash in drools-pdpJim Hahn2-4/+4
Issue-ID: POLICY-3160 Change-Id: I37b2b75d010781108e40ae39d3742bc2c2e2fd7e Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-11bump pom versions to 1.9.0-SNAPSHOTjhh1-1/+1
Issue-ID: POLICY-3105 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I0686675cdddf6fb5ce78f792484486f39d705a58
2021-03-10bump poms to 1.8.2-SNAPSHOTjhh1-1/+1
Issue-ID: POLICY-3127 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I0cf960650fbd2010a7c747d4932fdf8226c1fa07
2021-03-04Fix default timestamp in upgrade scriptJim Hahn2-10/+10
The 1811 upgrade script for distributed locking is failing, because the default timestamp value is invalid for the new column type. Modified the value and also added one for the downgrade script. Issue-ID: POLICY-3117 Change-Id: I8dff748cb089db551820418b1d597a1be207c9b5 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-24bump poms to 1.8.1-SNAPSHOTjhh1-1/+1
Issue-ID: POLICY-3088 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I2210fcc34c9f69c3ea42c07543ffb9834f719620
2021-02-17Upgrade dependencies in drools-pdp for IQ issuesJim Hahn1-2/+2
IQ reports identified a couple of vulnerabilities in various dependencies. Upgraded to the latest version of them per SECCOM. Issue-ID: POLICY-3005 Change-Id: I52f1137bfaeee0d715ee438b69e98f2d06849d38 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-12Fix sonars from dependency upgradeJim Hahn1-4/+4
The dependency upgrades in policy-parent caused some new sonars. In particular, initMocks() has been deprecated - replaced with calls to the Mockito Runner. Changed one to openMocks() because using the Runner caused it to fail on jenkins, but not in the local eclipse. Also fixed a type safety issue with EMPTY_LIST. Issue-ID: POLICY-2909 Change-Id: Iea9420190f208d7de3bf3ad531515c92e0fab83f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-09Upgrade dependenciesJim Hahn3-7/+10
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-11-30move all bash to ash shell scriptsTaka Cho2-10/+10
this gerrit would be the first step to not to use any GPL-3.0 and plus license Issue-ID: POLICY-2847 Change-Id: I09a571f14ef8c6983f9051068c2bad5acc173787 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-10-27Bump drools-pdp master to 1.8.0-SNAPSHOTJim Hahn1-1/+1
Bumping minor version now that guilin branch has been created. Also repointed to snapshot versions for dependencies. Issue-ID: POLICY-2875 Change-Id: Ic3d5b96e610db0487ce316a9397d2f9ecb04bda6 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-20Bump drools-pdp to 1.7.5 SNAPSHOTJim Hahn1-1/+1
Issue-ID: POLICY-2869 Change-Id: Id2fcbfcb5435f79b5ebb74a403fd6133d1b79a7c Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-09bump drools-pdp to 1.7.4-SNAPSHOTTaka Cho1-1/+1
Issue-ID: POLICY-2839 Change-Id: I85d286a012d7b54b8c847d94951703d2e6462e13 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-10-07Bump drools-pdp to 1.7.3 snapshotTaka Cho1-1/+1
Issue-ID: POLICY-2839 Change-Id: I750b5130c421dafd95dc4f323e891384a7815841 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-09-08bump to 1.7.2-SNAPSHOTjhh1-1/+1
Issue-ID: POLICY-2789 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I0fb5ead444c23882454e3a48efea9d936a84e455
2020-08-28Fix sonar issue in distributed lockingJim Hahn1-1/+2
Fixed sonar issue: - Refactor the code of the lambda to have only one invocation throwing an exception Issue-ID: POLICY-2616 Change-Id: I8d96b95d0da9a780daacec7a4de17167642b03c1 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-10Bump drools-pdp to 1.7.1-SNAPSHOTTaka Cho1-1/+1
Issue-ID: POLICY-2709 Change-Id: Ifb6232eb428e2cd9c729fef54862779b2ee55bbc Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-07-01Updating drools pdp dependenciesRossC1-4/+5
Issue-ID: POLICY-2387 Change-Id: I5fe17c2514aed5c595d4e2a3d95fbb210a6f229b Signed-off-by: RossC <ross.carter@est.tech>
2020-06-15reduce sonar issue - 2 revTaka Cho1-1/+2
In some conditions for assertTrue, sonarcloud recommends using assertEquals Assert.assertTrue(a.equals(b)); Assert.assertTrue(a == b); Assert.assertTrue(a == null); Assert.assertTrue(a != null); Assert.assertFalse(a.equals(b)); Compliant Solution Assert.assertEquals(a, b); Assert.assertSame(a, b); Assert.assertNull(a); Assert.assertNotNull(a); Assert.assertNotEquals(a, b); Issue-ID: POLICY-2616 Change-Id: Ib362573bd865d1b561916bf64640c8ddeaa02546 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-05-21Bump Drools-Pdp to 1.7.0aditya.puthuparambil1-1/+1
Issue-ID: POLICY-2514 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech> Change-Id: Ib18f045a621ce15f8381607ba87639dd188887e5
2020-05-21Bump Drools-Pdp to 1.6.4aditya.puthuparambil1-1/+1
Issue-ID: POLICY-2514 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech> Change-Id: Icb874f6b91488c5003e9d22460ce57e37b11dc30
2020-04-24Bump drools-pdp 1.6.3-SNAPSHOTPamela Dragosh1-1/+1
Issue-ID: POLICY-2510 Change-Id: Ic6ce8069e65c9b7606ab3529ee6291bc772a4191 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-14bump to 1.6.2-SNAPSHOTjhh1-1/+1
Issue-ID: POLICY-2378 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I75d0acdc4bfb4f2c1870d3c01591e81ada2b7a5f
2020-04-06Address sonar issues in drools-pdpJim Hahn2-5/+6
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-03-24Bump drools-pdp to 1.6.1-SNAPSHOTPeyton Puckett1-1/+1
Issue-ID: POLICY-2378 Change-Id: I59fb1860178cc7960f7aa553557d83d60b686ac6 Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2020-01-13policy/drools-pdp jdk11 upgradesHockla, Ali (ah999m)2-11/+6
Issue-ID: POLICY-1589 Change-Id: I0ed05c6e471a7da6658e02a4ba3115d3a117cedd Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2019-11-14Invoke lock callback in session threadJim Hahn2-10/+26
Injects the callback as a DroolsRunnable into the session, if there is one. Otherwise, it invokes it via the engine's thread pool. Issue-ID: POLICY-2246 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I214480ae675d89e7335dde4eb4abe2684f7ef8ab Signed-off-by: Jim Hahn <jrh3@att.com>
2019-11-05Fix syntax error in DistributedLock "DELETE"Jim Hahn1-2/+2
Changed the "DELETE" to "DELETE FROM" to fix this error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use Issue-ID: POLICY-2203 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I10a398c13dc3da547d2b3ea47564ab0d5761a2ee
2019-10-31Refactor duplicate code from lock managersJim Hahn2-227/+84
Change-Id: I8910a1a4267d824f064b52c6ad08945590bd9617 Issue-ID: POLICY-2203 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-24Handle DB error codes in distributed lockingJim Hahn6-74/+30
The commons library wraps the SQLExceptions within its own SQLException, so changed the code to simply look for a cause that's SQLTransientException, eliminating the need to check specific error codes. Deleted the error code property now that it is no longer needed. Also updated the distributed locking properties to include examples. Issue-ID: POLICY-2113 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: If46e85a81cfc952e561174fea670df81efb8309a
2019-10-17Reimplement Lock API using Lock objectsJim Hahn15-1060/+2998
Modified PolicyResourceLockManager to just return a feature, deferring the lock() call/method to the feature, itself. The manager was also modified so that, if it can't find an enabled provider, it will return a default provider, whose lock() methods always fail. Once a feature has been identified, the manager will cache it for use thereafter. Modified the feature API to return lock objects and simplified the interface to remove the beforeXxx and afterXxx methods. Moved the unlock and refresh methods from the feature API into the lock class, renaming them to free and extend, respectively. Added a separate, feature-simple-locking project, which implements a simple version of the locking feature, over a single JVM. Extensively revised the distributed locking feature to fit in with the new API. Added support for persistence so that the various LockImpl classes can be serialized and still function correctly when they are deserialized back into new feature instances Added default implementations of free & extend to LockImpl. Modified API to take the ownerKey string, instead of the owner object. Removed Extractor as unneeded - may add via another review, if still useful. Updates per review comments: - Updated licenses in feature-simple-locking - Added beforeCreateLock & afterCreateLock to feature API - Moved SimpleLockingFeature into policy-management so that it's always available - Moved the executor service, "exsvc", into PolicyEngine - Moved Extrator into policy-utils - Changed Extractor logging level for exceptions - Fixed feature sequence numbers - Fixed mixing of seconds and milliseconds - Renamed exsvc - Modified to use property method with default value - Configured scheduled executor - Added suffix to Extractor.register() - Eliminated Feature Api and tied lock manager into engine - Added non-null checks to LockImpl parameters - Added non-null checks to createLock() parameters - Checked that lockManager is initialized Change-Id: Iddba38157ddc5f7277656979c0e679e5489eb7b1 Issue-ID: POLICY-2113 Signed-off-by: Jim Hahn <jrh3@att.com>