Class AsyncEventScheduler

java.lang.Object
org.imixs.workflow.engine.AsyncEventScheduler

@DeclareRoles("org.imixs.ACCESSLEVEL.MANAGERACCESS") @RunAs("org.imixs.ACCESSLEVEL.MANAGERACCESS") public class AsyncEventScheduler extends Object
The AsyncEventScheduler starts a scheduler service to process async events in an asynchronous way by calling the AsyncEventService.

The AsyncEventScheduler runs on a non-persistent ejb timer with the interval 'ASYNCEVENT_PROCESSOR_INTERVAL' and an optional delay defined by 'ASYNCEVENT_PROCESSOR_INITIALDELAY'. To enable the processor 'ASYNCEVENT_PROCESSOR_ENABLED' must be set to true (default=false). 'ASYNCEVENT_PROCESSOR_DEADLOCK' deadlock timeout

In a clustered environment this timer runs in each cluster member that contains the EJB. So this means the non-persistent EJB Timer scales horizontal within a clustered environment – e.g. a Kubernetes cluster.

Version:
1.1
Author:
rsoika
See Also:
  • Constructor Details

    • AsyncEventScheduler

      public AsyncEventScheduler()
  • Method Details

    • init

      @PostConstruct public void init()
    • run

      public void run(jakarta.ejb.Timer timer)
      The method delegates the event processing to the stateless ejb AsyncEventProcessor.

      Before processing the eventLog the method releases possible dead locks first. Both methods are running in separate transactions