The Scheduler works like that:
It has a timer on which it subsribes filtered listeners. When the timer triggers, the appropriate listener catches the event and calls the predefined target class or mbean with some certain parameters. What you really want if i understood right, is to have your applications listen to the same timer events as the scheduler does. And you want to use the scheduler for that.
There are 2 solutions as i can see it.
The first one is based on being able to catch the timer events as the Scheduler itself does. This you can do by throwing away the Scheduler :) and use the Timer directly. You can set the Timer Mbean to start when jboss starts, and then your every application could implement the NotificationListener interface and subscribe to the timer through the JMX Server.
private ObjectName mTimer;
mTimer = new ObjectName("jboss:service=Timer");
mListener = new YourListenerClass();
Check this out to see how the SchedulerManager works.
The second , easiest and best solution in my opinion is to make your scheduler's target class or mbean to place messages on a durable Topic, and then have your EJB applications subscribe on this Topic. So its MDB solution :)
In order to do that, you ll have to read about the scheduler's target which can be defined in your jboss-service.xml, and how to develop a custom target (plain class or mbean). Check the JMS documentation for the Topic and how to develop topic subscribers.
Thank you very much for taking the time to reply. I am going to try to get my arms around and implement your first suggestion.
I suppose I'll register the EJB NotificationListener in the Servlet of that application. Is there a better place to do it?
Does this scheduler infrastructure have support for cron triggers?
Another possibility is to use the J2EE Timer Service (check the j2ee 1.4 spec).