No, there is just one EJB.
This is the Timeout Method of my bean:
@Timeout
@Override
public void handleTimeout(Timer timer) {
scheduler.runSchedulerTask(timer);
}
And than:
public void runSchedulerTask(Timer timer) {
String timerEvent = (String)timer.getInfo();
if(timerEvent.compareTo("aaa") == 0) {handleaaaEvent();}
else if(timerEvent.compareTo("bbb") == 0) {handlebbbEvent();}
}
As you can see, there are two active timers (here named "aaa" and "bbb"). For each timer there is the corrersponding handler method. In these methods than I read from the database and write to it.
[Message sent by forum member 'glassfox' (glassfox)]
http://forums.java.net/jive/thread.jspa?messageID=332982