I want to use the @Schedule annotation to activate a method every 5 seconds. But the scheduler never activates the method. The application runs in Open Liberty. None of the two System.out.println is displayed on the console. What is missing to make the scheduler work?
import javax.ejb.Schedule; import javax.ejb.Stateless; import javax.ejb.Timer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Stateless public class MyScheduler { private static final Logger LOG = LoggerFactory.getLogger(MyScheduler.class); public MyScheduler() { System.out.println("******* into constructor MyScheduler"); } @Schedule(second = "*/5", minute = "*", hour = "*", persistent = false) public void schedule() { System.out.println("******* into scheduler MyScheduler"); } }