Package javax.ejb

Examples of javax.ejb.TimerConfig


                    "] with the first expiration set to: " + initialExpiration);
        }

        if (timerConfig == null) {
            // Easier create one than check everywhere for null...
            timerConfig = new TimerConfig();
        }

        RuntimeTimerState timerState =
            new RuntimeTimerState(timerId, initialExpiration,
                                  intervalDuration, containerId, container,
View Full Code Here


                    // non-persistent timers on a clustered deploy
                    continue;
                }

                EJBTimerSchedule ts = new EJBTimerSchedule(sch, mname, args_length);
                TimerConfig tc = new TimerConfig();
                String info = sch.getInfo();
                if (info != null && !info.equals("")) {
                    tc.setInfo(info);
                }
                tc.setPersistent(persistent);
                TimerPrimaryKey tpk = createTimer(containerId, applicationId, ts, tc, server_name);
                if( logger.isLoggable(Level.FINE) ) {
                        logger.log(Level.FINE, "@@@ CREATED new schedule: " + ts.getScheduleAsString() + " FOR method: " + key);
                }
View Full Code Here

        public void justToCheckZeroTimersInListAtStartup() {
            // no-op
        }

        public void newTimer() {
            final TimerConfig tc = new TimerConfig("my-timer", true);
            final ScheduleExpression se = new ScheduleExpression();
            final Calendar calendar = Calendar.getInstance();
            calendar.add(Calendar.SECOND, 2);
            se.second(calendar.get(Calendar.SECOND) + "/3");
            se.minute("*");
 
View Full Code Here

            }
        }

        private void createTimer() {
            try {
                this.timer = this.timerService.createSingleActionTimer(100, new TimerConfig(TIMER_NAME, false));
            } catch (Exception e) {
                throw new RuntimeException("SingleActionTimer: Failed to create timer", e);
            }
        }
View Full Code Here

      }
    }
  }
 
  public void createTimers() {
    TimerConfig timerConf = new TimerConfig();
    timerConf.setPersistent(false);
    int interval = 0;
    if(clsEntStartupInitSingleton.getTimerInterval() !=0)
      interval = clsEntStartupInitSingleton.getTimerInterval();
    LOG.info("==== Timer set for interval sec <{}>", interval);
    //timerService.createTimer(1000, 5 * 60 * 1000, "create timer");
View Full Code Here

                    "] with the first expiration set to: " + initialExpiration);
        }

        if (timerConfig == null) {
            // Easier create one than check everywhere for null...
            timerConfig = new TimerConfig();
        }

        RuntimeTimerState timerState =
            new RuntimeTimerState(timerId, initialExpiration,
                                  intervalDuration, containerId, container,
View Full Code Here

                    // non-persistent timers on a clustered deploy
                    continue;
                }

                TimerSchedule ts = new TimerSchedule(sch, mname, args_length);
                TimerConfig tc = new TimerConfig();
                String info = sch.getInfo();
                if (info != null && !info.equals("")) {
                    tc.setInfo(info);
                }
                tc.setPersistent(persistent);
                TimerPrimaryKey tpk = createTimer(containerId, applicationId, ts, tc, server_name);
                if( logger.isLoggable(Level.FINE) ) {
                        logger.log(Level.FINE, "@@@ CREATED new schedule: " + ts.getScheduleAsString() + " FOR method: " + key);
                }
View Full Code Here

                    "] with the first expiration set to: " + initialExpiration);
        }

        if (timerConfig == null) {
            // Easier create one than check everywhere for null...
            timerConfig = new TimerConfig();
        }

        RuntimeTimerState timerState =
            new RuntimeTimerState(timerId, initialExpiration,
                                  intervalDuration, containerId, container,
View Full Code Here

                    // non-persistent timers on a clustered deploy
                    continue;
                }

                EJBTimerSchedule ts = new EJBTimerSchedule(sch, mname, args_length);
                TimerConfig tc = new TimerConfig();
                String info = sch.getInfo();
                if (info != null && !info.equals("")) {
                    tc.setInfo(info);
                }
                tc.setPersistent(persistent);
                TimerPrimaryKey tpk = createTimer(containerId, applicationId, ts, tc, server_name);
                if( logger.isLoggable(Level.FINE) ) {
                        logger.log(Level.FINE, "@@@ CREATED new schedule: " + ts.getScheduleAsString() + " FOR method: " + key);
                }
View Full Code Here

      org.jboss.ejb3.timerservice.extension.TimerService ejb31TimerService = (org.jboss.ejb3.timerservice.extension.TimerService) timerService;
      // process each auto timer
      for (TimerMetaData autoTimerMetaData : autoTimersMetaData)
      {
         // create a timer config
         TimerConfig timerConfig = new TimerConfig();
         timerConfig.setPersistent(autoTimerMetaData.isPersistent());
         timerConfig.setInfo(autoTimerMetaData.getInfo());
         NamedMethodMetaData timeoutMethodMetaData = autoTimerMetaData.getTimeoutMethod();
         // get hold of the timeout method for this auto-timer
         Method timeoutMethod = this.getTimeoutMethod(timeoutMethodMetaData, this.container.getBeanClass());
         if (timeoutMethod == null)
         {
View Full Code Here

TOP

Related Classes of javax.ejb.TimerConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.