Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows 7 x64 and x86
      GlassFish Server Open Source Edition 3.1.2 (build 23)
      JDK 1.6.0_20-b02 and 1.7.0_21-b11

      Description

      I have de same Problem that (Related key: GLASSFISH-20673)
      Now is Sunday in my Country.

      My code:

      ...
      ...
      ...
      ...
      ...
      @Startup
      @Singleton
      public class RiegoAutomatico {

      @Resource
      TimerService timerService;
      private Timer timer;
      private Timer timer2;
      private String dias;
      private String hora;
      private String minuto;
      private String intervaloMonitoreoHoras;
      @EJB
      private GestorDeConfiguracionDelNodo gdcdn;
      @EJB
      private GestorDeConfiguracionDeRiegoAgendado gdcdra;
      ...
      ...
      ...
      ...

      public void setTimerDeRiegoAutomatico() {

      //this.dias contains "Tue,Sun"
      //this.hora contains "7"
      //this.minuto contains "0"

      timer = timerService.createCalendarTimer(new ScheduleExpression().dayOfWeek(this.dias).hour(this.hora).minute(this.minuto), new TimerConfig("RiegoAutomatico", true));

      System.out.println("Riego Automático agendado como: " + timer.getSchedule().toString());
      System.out.println("Riego Automático calendar: " + Calendar.getInstance());
      System.out.println("Riego Automático Locale.getDefault().getCountry(): " + Locale.getDefault().getCountry());
      System.out.println("Riego Automático Locale.getDefault().getDisplayCountry(): " + Locale.getDefault().getDisplayCountry());
      System.out.println("Riego Automático Locale.getDefault().getDisplayLanguage(): " + Locale.getDefault().getDisplayLanguage());
      System.out.println("Riego Automático Locale.getDefault().getDisplayName(): " + Locale.getDefault().getDisplayName());
      System.out.println("Riego Automático Locale.getDefault().getDisplayVariant(): " + Locale.getDefault().getDisplayVariant());
      System.out.println("Riego Automático Locale.getDefault().getISO3Country(): " + Locale.getDefault().getISO3Country());
      System.out.println("Riego Automático Locale.getDefault().getISO3Language(): " + Locale.getDefault().getISO3Language());
      System.out.println("Riego Automático Locale.getDefault().getLanguage(): " + Locale.getDefault().getLanguage());
      System.out.println("Riego Automático Locale.getDefault().getVariant(): " + Locale.getDefault().getVariant());
      System.out.println("Riego Automático timer.getNextTimeout()" + timer.getNextTimeout());
      System.out.println("Riego Automático timer.getHandle().getTimer().toString(): " + timer.getHandle().getTimer().toString());

      //this.intervaloMonitoreoHoras contains "1"
      timer2 = timerService.createCalendarTimer(new ScheduleExpression().dayOfWeek("*").hour(this.intervaloMonitoreoHoras), new TimerConfig("RiegoMixto", true));
      }

      My Output:
      ...
      Launching GlassFish on Felix platform
      Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2 (build 23)
      ...
      ...
      ...

      INFO: Riego Automático agendado como: ScheduleExpression [second=0;minute=0;hour=7;dayOfMonth=*;month=*;dayOfWeek=Tue,Sun;year=*;timezoneID=null;start=null;end=null] <--- This timer is fine (don't runs endless)

      INFO: Riego Automático calendar: java.util.GregorianCalendar[time=1381713382872,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/Montevideo",offset=-10800000,dstSavings=3600000,useDaylight=true,transitions=132,lastRule=java.util.SimpleTimeZone[id=America/Montevideo,offset=-10800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=9,startDay=1,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=2,endDay=8,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=2,minimalDaysInFirstWeek=1,ERA=1,YEAR=2013,MONTH=9,WEEK_OF_YEAR=41,WEEK_OF_MONTH=2,DAY_OF_MONTH=13,DAY_OF_YEAR=286,DAY_OF_WEEK=1,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=11,HOUR_OF_DAY=23,MINUTE=16,SECOND=22,MILLISECOND=872,ZONE_OFFSET=-10800000,DST_OFFSET=3600000]

      INFO: Riego Automático Locale.getDefault().getCountry(): UY
      INFO: Riego Automático Locale.getDefault().getDisplayCountry(): Uruguay
      INFO: Riego Automático Locale.getDefault().getDisplayLanguage(): español
      INFO: Riego Automático Locale.getDefault().getDisplayName(): español (Uruguay)
      INFO: Riego Automático Locale.getDefault().getDisplayVariant():
      INFO: Riego Automático Locale.getDefault().getISO3Country(): URY
      INFO: Riego Automático Locale.getDefault().getISO3Language(): spa
      INFO: Riego Automático Locale.getDefault().getLanguage(): es
      INFO: Riego Automático Locale.getDefault().getVariant():

      INFO: Riego Automático timer.getNextTimeout()Tue Oct 15 07:00:00 UYST 2013

      INFO: Riego Automático timer.getHandle().getTimer().toString(): Timer 10@@1381713317699@@server@@domain1
      ...
      ...
      ...
      ScheduleExpression [second=0;minute=0;hour=*/1;dayOfMonth=*;month=*;dayOfWeek=*;year=*;timezoneID=null;start=null;end=null]|#] <--- This timer is fine (don't runs endless)
      ...
      ...

      /********************************************************************************************/
      Now when I change the content of the variable //this.dias with "Tue,Sat"
      /********************************************************************************************/

      ...
      Launching GlassFish on Felix platform
      Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2 (build 23)
      ...
      ...
      ...

      INFO: Riego Automático agendado como: ScheduleExpression [second=0;minute=0;hour=7;dayOfMonth=*;month=*;dayOfWeek=Tue,Sat;year=*;timezoneID=null;start=null;end=null] <--- This timer isn't fine (starts runs endless!!!!)

      INFO: Riego Automático calendar: java.util.GregorianCalendar[time=1381713555852,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/Montevideo",offset=-10800000,dstSavings=3600000,useDaylight=true,transitions=132,lastRule=java.util.SimpleTimeZone[id=America/Montevideo,offset=-10800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=9,startDay=1,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=2,endDay=8,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=2,minimalDaysInFirstWeek=1,ERA=1,YEAR=2013,MONTH=9,WEEK_OF_YEAR=41,WEEK_OF_MONTH=2,DAY_OF_MONTH=13,DAY_OF_YEAR=286,DAY_OF_WEEK=1,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=11,HOUR_OF_DAY=23,MINUTE=19,SECOND=15,MILLISECOND=852,ZONE_OFFSET=-10800000,DST_OFFSET=3600000]

      INFO: Riego Automático Locale.getDefault().getCountry(): UY
      INFO: Riego Automático Locale.getDefault().getDisplayCountry(): Uruguay
      INFO: Riego Automático Locale.getDefault().getDisplayLanguage(): español
      INFO: Riego Automático Locale.getDefault().getDisplayName(): español (Uruguay)
      INFO: Riego Automático Locale.getDefault().getDisplayVariant():
      INFO: Riego Automático Locale.getDefault().getISO3Country(): URY
      INFO: Riego Automático Locale.getDefault().getISO3Language(): spa
      INFO: Riego Automático Locale.getDefault().getLanguage(): es
      INFO: Riego Automático Locale.getDefault().getVariant():

      INFO: Riego Automático timer.getNextTimeout()Tue Oct 08 07:00:00 UYST 2013

      INFO: Riego Automático timer.getHandle().getTimer().toString(): Timer 11@@1381713317699@@server@@domain1

      ...
      ...
      ...
      ScheduleExpression [second=0;minute=0;hour=*/1;dayOfMonth=*;month=*;dayOfWeek=*;year=*;timezoneID=null;start=null;end=null]|#] <--- This timer is fine (don't runs endless)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            michael.y.chen
            Reporter:
            black_unicorn
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: