users@ejb-spec.java.net

[ejb-spec users] EJB - create timer restrictions

From: Katia Todorova <katia_vnm_at_abv.bg>
Date: Thu, 20 Mar 2014 16:24:54 +0200 (EET)

 Hello, I have a question regarding creation of a calendar timer with end date specified before the start date. According to the javadoc: http://docs.oracle.com/javaee/7/api/javax/ejb/TimerService.html#createCalendarTimer(javax.ejb.ScheduleExpression, javax.ejb.TimerConfig)
and also http://docs.oracle.com/javaee/6/api/javax/ejb/TimerService.html#createCalendarTimer(javax.ejb.ScheduleExpression, javax.ejb.TimerConfig) java.lang.IllegalArgumentException
is thrown if Schedule represents an invalid schedule expression.
    So the question: is an expression invalid if it specifies end time before the start time and should this cause timer creation failure? An example of such expression: ScheduleExpression [second=3;minute=3;hour=3;dayOfMonth=3;month=3;dayOfWeek=*;year=2014;timezoneID=null;start=null;end=Wed Mar 20 13:04:07 FET 2013]
   Thank you in advance, Katia