I have moved from GlassFish in the past couple of days and I am using JBoss 6 and JBoss Developer Studio (30 day trail) to see if this is the way to go.
I have created a Session Bean that is as follows:
@Stateless
@LocalBean
public class FileMonitorTimer {
@Schedule(second = "*/15", minute = "*", hour = "*", dayOfMonth = "*", month = "*", year = "*")
public void ProcessFiles() {
//do bits here
}
Every time I run the project from the IDE I get another timer instance created, so my questions are:
How do I remove multiple timer copies?
How do I ensure only one timer exists?
I didn't have this issue with GlassFish, but the code is the same.
Dave