Skip to content

Commit

Permalink
[JBPM-10209] Gonzalos comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado committed Nov 15, 2023
1 parent e497bc9 commit d95b41f
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,15 @@ public JobHandle scheduleJob(Job job, JobContext ctx, Trigger trigger) {

@Override
public boolean removeJob(JobHandle jobHandle) {
final Timer ejbTimer = getEjbTimer(getTimerMappinInfo(((EjbGlobalJobHandle) jobHandle).getUuid()));
String uuid = ((EjbGlobalJobHandle) jobHandle).getUuid();
final Timer ejbTimer = getEjbTimer(getTimerMappinInfo(uuid));
if (TRANSACTIONAL && ejbTimer == null) {
// this situation needs to be avoided as it should not happen
logger.warn("EJB timer is null for uuid {} and transactional flag is enabled", uuid);
return false;
}
return scheduler.removeJob(jobHandle, ejbTimer);
boolean result = scheduler.removeJob(jobHandle, ejbTimer);
logger.debug("Remove job returned {}", result);
return result;
}

private TimerJobInstance getTimerJobInstance (String uuid) {
Expand Down

0 comments on commit d95b41f

Please sign in to comment.