diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index d64cd49177..a4b76b9530 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index a80b22ce5c..9355b41557 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/gradlew b/gradlew
index 1aa94a4269..f5feea6d6b 100755
--- a/gradlew
+++ b/gradlew
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+# SPDX-License-Identifier: Apache-2.0
+#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
-APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
+' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
diff --git a/gradlew.bat b/gradlew.bat
index 7101f8e467..9b42019c79 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
diff --git a/modules/syslog/src/main/java/org/jpos/syslog/LoggeableSysLog.java b/modules/syslog/src/main/java/org/jpos/syslog/LoggeableSysLog.java
index 47e6af56cd..c0dc3e31cc 100644
--- a/modules/syslog/src/main/java/org/jpos/syslog/LoggeableSysLog.java
+++ b/modules/syslog/src/main/java/org/jpos/syslog/LoggeableSysLog.java
@@ -16,7 +16,8 @@
* along with this program. If not, see .
*/
-package org.jpos.ee;
+package org.jpos.syslog;
+
import org.jpos.util.Loggeable;
import java.io.PrintStream;
diff --git a/modules/syslog/src/main/java/org/jpos/syslog/SysLog.java b/modules/syslog/src/main/java/org/jpos/syslog/SysLog.java
index ef8eb871f2..2fc386d76b 100644
--- a/modules/syslog/src/main/java/org/jpos/syslog/SysLog.java
+++ b/modules/syslog/src/main/java/org/jpos/syslog/SysLog.java
@@ -16,19 +16,32 @@
* along with this program. If not, see .
*/
-package org.jpos.ee;
+package org.jpos.syslog;
+
+import jakarta.persistence.*;
+import jakarta.persistence.Table;
+import org.hibernate.annotations.*;
+import org.hibernate.annotations.Cache;
import java.io.Serializable;
+import java.time.Instant;
+import java.time.LocalTime;
import java.util.Date;
+import java.util.Objects;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
+@Entity
+@SoftDelete
+@Table(name = "syslog")
+@Cache(usage = CacheConcurrencyStrategy.NONE)
+@Comment("System audit log")
@SuppressWarnings("unused")
public class SysLog implements Serializable {
- private Long id;
- private Date date;
+ @Id
+ @GeneratedValue (strategy = GenerationType.SEQUENCE)
+ private long id;
+
+ private Instant date;
+
private boolean deleted;
private String source;
private String type;
@@ -129,21 +142,23 @@ public void setTrace(String trace) {
this.trace = trace;
}
+ @Override
public String toString() {
- return new ToStringBuilder(this)
- .append("id", getId())
- .toString();
+ return "SysLog{" +
+ "id=" + id +
+ '}';
}
- public boolean equals(Object other) {
- if ( !(other instanceof SysLog) ) return false;
- SysLog castOther = (SysLog) other;
- return new EqualsBuilder()
- .append(this.getId(), castOther.getId())
- .isEquals();
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ SysLog sysLog = (SysLog) o;
+ return Objects.equals(id, sysLog.id);
}
+
+ @Override
public int hashCode() {
- return new HashCodeBuilder()
- .append(getId())
- .toHashCode();
+ return Objects.hash(id);
}
}
diff --git a/modules/syslog/src/main/java/org/jpos/syslog/SysLogManager.java b/modules/syslog/src/main/java/org/jpos/syslog/SysLogManager.java
index f817c32655..4aee919aa5 100644
--- a/modules/syslog/src/main/java/org/jpos/syslog/SysLogManager.java
+++ b/modules/syslog/src/main/java/org/jpos/syslog/SysLogManager.java
@@ -16,10 +16,12 @@
* along with this program. If not, see .
*/
-package org.jpos.ee;
+package org.jpos.syslog;
import java.util.Date;
+import org.jpos.ee.DB;
+import org.jpos.ee.DBManager;
import org.jpos.util.Logger;
import org.jpos.util.LogEvent;
import org.hibernate.Transaction;
@@ -106,10 +108,10 @@ public SysLog log (String source, String type, int severity,
}
if (autoCommit) {
Transaction tx = db.beginTransaction ();
- db.session().save (evt);
+ db.session().persist (evt);
tx.commit ();
} else {
- db.session().save (evt);
+ db.session().persist (evt);
}
if (autoClose)
db.close ();
@@ -159,13 +161,11 @@ private void errorLog (SysLog evt, Throwable t) {
}
public SysLog get (long id) {
try {
- return db.session().load (SysLog.class, new Long (id));
+ return db.session().getReference(SysLog.class, id);
} catch (Throwable e) {
db.getLog().error (e);
}
return null;
}
-
-
}
diff --git a/modules/syslog/src/main/java/org/jpos/syslog/info/StartStop.java b/modules/syslog/src/main/java/org/jpos/syslog/info/StartStop.java
index d06b854c96..cec0a27ed0 100644
--- a/modules/syslog/src/main/java/org/jpos/syslog/info/StartStop.java
+++ b/modules/syslog/src/main/java/org/jpos/syslog/info/StartStop.java
@@ -16,10 +16,10 @@
* along with this program. If not, see .
*/
-package org.jpos.ee.info;
+package org.jpos.syslog.info;
-import org.jpos.ee.SysLog;
-import org.jpos.ee.SysLogManager;
+import org.jpos.syslog.SysLog;
+import org.jpos.syslog.SysLogManager;
import org.jpos.q2.QBeanAsyncSupport;
import org.jpos.util.DateUtil;
diff --git a/modules/syslog/src/main/resources/META-INF/org/jpos/ee/modules/syslog.xml b/modules/syslog/src/main/resources/META-INF/org/jpos/ee/modules/syslog.xml
index b291236f94..f034e755db 100644
--- a/modules/syslog/src/main/resources/META-INF/org/jpos/ee/modules/syslog.xml
+++ b/modules/syslog/src/main/resources/META-INF/org/jpos/ee/modules/syslog.xml
@@ -1,25 +1,6 @@
-
-
-
+
-
+
-