Search code examples
ejbquartz-schedulertimertask

Different handlers for ejb Timer


I'm trying to set different handlers for different types of tasks created via TimerService , ejb.

I need to figure out a way where I can create a schedule tasks with extra information including the handler type so when a timeout occurs different handlers should be fired according to the timer identification.


Solution

  • Eventually the solution to the problem as i tried to explain is by adding Serialized handler, which is set when you create a timer event.

    after you set a handler you can get it from the timer object, so when a timeout occurs we can execute an action according to the relevant handler.