EjbSchedulerService only detects new timers if they are for process context:
private boolean isNewTimer(JobContext ctx) { return ctx instanceof ProcessJobContext && ((ProcessJobContext) ctx).isNewTimer(); }
all efforts to avoid traverse all timers are missed in other scenarios, like creating notifications:
TaskDeadlineJobContext
so for a system with thousands of timers, each notification created needs to traverse all timer table for no reason
2023-05-03 13:53:45.610 CEST [1984279] LOG: ejecutar S_22: SELECT INFO FROM JBOSS_EJB_TIMER WHERE TIMED_OBJECT_ID=$1 and ID=$2 2023-05-03 13:53:45.610 CEST [1984279] DETALLE: parámetros: $1 = 'kie-server.kie-server.EJBTimerScheduler', $2 = '341b7437-996c-4d02-95ef-0ecbad902133' 2023-05-03 13:53:48.318 CEST [1976775] LOG: ejecutar S_5: SELECT INFO FROM JBOSS_EJB_TIMER WHERE TIMED_OBJECT_ID=$1 and ID=$2 2023-05-03 13:53:48.318 CEST [1976775] DETALLE: parámetros: $1 = 'kie-server.kie-server.EJBTimerScheduler', $2 = '687cc2c0-9899-4ecf-b82b-7df848977916' ...
the creation of at timer should always be managed for each context
private boolean isNewTimer(JobContext ctx) { return ((TimerJobContext) ctx).isNewTimer(); }