Using NetBeans 7.1 / GlassFish 3.1, I created a new TimerSessionBean.
@Stateless public class NewTimerSessionBean implements NewTimerSessionBeanLocal { @Schedule(minute = "*", second = "0", dayOfMonth = "*", month = "*", year = "*", hour = "9-17", dayOfWeek = "Mon-Fri") @Override public void myTimer() { System.out.println("Timer event: " + new Date()); } }
How can I declare that the timer is not constant? http://www.theserverside.com/news/1363578/EJB-31-A-Significant-Step-Towards-Maturity says that the isPersistent method exists, but it belongs to the Timer interface.
I came to this question after reading the description of potential problems with EJB timers in this article: http://www.coderanch.com/t/477104/EJB-JEE/java/Java-EE-timer-service-periodical
According to this article, you can achieve this by adding persistent = false to @Schedule
Source: https://habr.com/ru/post/1393943/More articles:How can I catch a firefox spelling correction event? - javascriptHow to run all my junit class tests at once - javaStop the application from working with the client - iphoneimport rules.csv file into sonar - sonarqubeRename multiple directories with one domain name to another domain name? - linuxLLVM IR Erase Instructions - llvmHowto requests nested resources using RESTkit for Objective-C - restHow to show Dialog in onCreate method? - androidHow to reference a static library using g ++ - c ++Writing a structure to NSMutableArray - arraysAll Articles