From fc488fb21f7121bb7e88394cc093436cdb662f6d Mon Sep 17 00:00:00 2001 From: krisv Date: Wed, 11 Sep 2024 13:34:16 +0200 Subject: [PATCH] Skipping list search completely if !searchIfFailed --- .../org/jbpm/services/ejb/timer/EJBTimerScheduler.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jbpm-services/jbpm-services-ejb/jbpm-services-ejb-timer/src/main/java/org/jbpm/services/ejb/timer/EJBTimerScheduler.java b/jbpm-services/jbpm-services-ejb/jbpm-services-ejb-timer/src/main/java/org/jbpm/services/ejb/timer/EJBTimerScheduler.java index 250d757886..c5cc94c366 100644 --- a/jbpm-services/jbpm-services-ejb/jbpm-services-ejb-timer/src/main/java/org/jbpm/services/ejb/timer/EJBTimerScheduler.java +++ b/jbpm-services/jbpm-services-ejb/jbpm-services-ejb-timer/src/main/java/org/jbpm/services/ejb/timer/EJBTimerScheduler.java @@ -282,11 +282,18 @@ public boolean removeJob(JobHandle jobHandle, Timer ejbTimer, boolean searchIfFa return false; } return true; + } else { + logger.warn("No TimerHandle found for {}: {}", ejbHandle, ejbTimerHandle); } } else { logger.warn("No timerJobInstance available for {}", ejbHandle); } + if (!searchIfFailed) { + logger.warn("Timer not found for {} and {}, skipping list search", ejbHandle, ejbTimer); + return false; + } + for (Timer timer : timerService.getTimers()) { try { Serializable info = timer.getInfo();