Hey guys,
I'm trying to set a timer for a Stateless EJB in Glassfish 2.1:
@Stateless(mappedName = "ServiceEJB")
public class ServiceEJB implements ServiceEJBRemote {
// other methods ...
// defining the timer
@Schedule(second="*/15", minute="*", hour="*")
public void test(){
System.out.println("++++++++ timer!!! ++++++++++++++++++++");
}
}
From what I've read, all I need to do is deploy the application and this should work. I was expecting to see in the log the printed text from the method test (every 15 seconds). Are there any other steps I need to take in order for this to work?
Thank you!