I tried to use the following piece of code to determine if my timer is already running:
String name = this.getClass().getName();
Collection<?> timers = timerService.getTimers();
for(Object t : timers)
{
if(t instanceof Timer)
continue;
if(((Timer)t).getInfo().equals(name))
return true;
}
But this checks only the timers of the _current bean instance_.
No chance to find timers on other hosts in the cluster...
This really sucks.
[Message sent by forum member 'batzee' (batzee)]
http://forums.java.net/jive/thread.jspa?messageID=333168