Examples of TimerService


Examples of javax.ejb.TimerService

    } catch (Exception e) {
      log.log(Level.FINER, e.toString(), e);
    }
   
    try {
      TimerService timer = context.getTimerService();
     
      BeanBuilder<TimerService> timerBuilder
        = injectManager.createBeanFactory(TimerService.class);
     
      if (injectManager.getBeans(TimerService.class).size() == 0)
View Full Code Here

Examples of javax.ejb.TimerService

 
  public void ejbCreate() {
  }

  public void createTimer(Timer timer) {
    TimerService timerService = sessionContext.getTimerService();
    log.debug("creating timer "+timer+" in the ejb timer service");
    timerService.createTimer(timer.getDueDate(), new TimerInfo(timer));
  }
View Full Code Here

Examples of javax.ejb.TimerService

    // TODO make the scanning of timers for cancellation optional by only deleting the timerjobs in the db.
    // of course, the corresponding ejb timer notifications have to be ignored.

    log.debug("cancelling timers with name "+timerName+" from the ejb timer service");

    TimerService timerService = sessionContext.getTimerService();
    Iterator iter = timerService.getTimers().iterator();
    while (iter.hasNext()) {
      javax.ejb.Timer ejbTimer = (javax.ejb.Timer) iter.next();
      if (ejbTimer.getInfo() instanceof TimerInfo) {
        TimerInfo timerInfo = (TimerInfo) ejbTimer.getInfo();
        if (timerInfo.matchesName(timerName, token)) {
View Full Code Here

Examples of javax.ejb.TimerService

    // TODO make the scanning of timers for cancellation optional by only deleting the timerjobs in the db.
    // of course, the corresponding ejb timer notifications have to be ignored.

    log.debug("deleting timers for process instance "+processInstance+" from the ejb timer service");

    TimerService timerService = sessionContext.getTimerService();
    Iterator iter = timerService.getTimers().iterator();
    while (iter.hasNext()) {
      javax.ejb.Timer ejbTimer = (javax.ejb.Timer) iter.next();
      if (ejbTimer.getInfo() instanceof TimerInfo) {
        TimerInfo timerInfo = (TimerInfo) ejbTimer.getInfo();
        if (timerInfo.matchesProcessInstance(processInstance)) {
View Full Code Here

Examples of javax.ejb.TimerService

    log.debug("creating timer "+id+" in the ejb timer service");
    createTimer(dueDate);
  }

  public void createTimer(String duration) {
    TimerService timerService = entityContext.getTimerService();
    BusinessCalendar businessCalendar = new BusinessCalendar();
    Date dueDateTime = businessCalendar.add(new Date(), new Duration(duration));
    timerService.createTimer(dueDateTime, null);
  }
View Full Code Here

Examples of javax.ejb.TimerService

 
  public void ejbCreate() {
  }

  public void createTimer(Timer timer) {
    TimerService timerService = sessionContext.getTimerService();
    log.debug("creating timer "+timer+" in the ejb timer service");
    timerService.createTimer(timer.getDueDate(), new TimerInfo(timer));
  }
View Full Code Here

Examples of javax.ejb.TimerService

    // TODO make the scanning of timers for cancellation optional by only deleting the timerjobs in the db.
    // of course, the corresponding ejb timer notifications have to be ignored.

    log.debug("cancelling timers with name "+timerName+" from the ejb timer service");

    TimerService timerService = sessionContext.getTimerService();
    Iterator iter = timerService.getTimers().iterator();
    while (iter.hasNext()) {
      javax.ejb.Timer ejbTimer = (javax.ejb.Timer) iter.next();
      if (ejbTimer.getInfo() instanceof TimerInfo) {
        TimerInfo timerInfo = (TimerInfo) ejbTimer.getInfo();
        if (timerInfo.matchesName(timerName, token)) {
View Full Code Here

Examples of javax.ejb.TimerService

    // TODO make the scanning of timers for cancellation optional by only deleting the timerjobs in the db.
    // of course, the corresponding ejb timer notifications have to be ignored.

    log.debug("deleting timers for process instance "+processInstance+" from the ejb timer service");

    TimerService timerService = sessionContext.getTimerService();
    Iterator iter = timerService.getTimers().iterator();
    while (iter.hasNext()) {
      javax.ejb.Timer ejbTimer = (javax.ejb.Timer) iter.next();
      if (ejbTimer.getInfo() instanceof TimerInfo) {
        TimerInfo timerInfo = (TimerInfo) ejbTimer.getInfo();
        if (timerInfo.matchesProcessInstance(processInstance)) {
View Full Code Here

Examples of javax.ejb.TimerService

    }

    public static void addTimers(final EJBComponent ejb, final ModelNode response) {
        response.setEmptyList();
        final String name = ejb.getComponentName();
        TimerService ts = ejb.getTimerService();
        if (ts != null) {
            for (Timer timer : ts.getTimers()) {
                ModelNode timerNode = response.add();
                addTimeRemaining(timer, timerNode, name);
                addNextTimeout(timer, timerNode, name);
                addCalendarTimer(timer, timerNode, name);
                addPersistent(timer, timerNode, name);
View Full Code Here

Examples of org.apache.agila.services.TimerService

        assertEquals(t, context.getCurrentExecutionToken());
        */
    }

    public void testTimerService(){
        TimerService ts = new TimerServiceImpl();
        context.setTimerService(ts);
        assertEquals(ts, context.getTimerService());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.