Package javax.ejb

Examples of javax.ejb.TimerConfig


    public Timer createTimer(long initialDuration, long intervalDuration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException {
        return ejbTimerService.createTimer(primaryKey, ejbTimeout, initialDuration, intervalDuration, new TimerConfig(info, true));
    }

    public Timer createTimer(long duration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException {
        return ejbTimerService.createTimer(primaryKey, ejbTimeout, duration, new TimerConfig(info, true));
    }
View Full Code Here


        return ejbTimerService.createTimer(primaryKey, ejbTimeout, initialExpiration, lintervalDuration, timerConfig);
    }

    public Timer createCalendarTimer(ScheduleExpression scheduleExpression) throws IllegalArgumentException, IllegalStateException, EJBException {
       
        return ejbTimerService.createTimer(primaryKey, ejbTimeout, copy(scheduleExpression), new TimerConfig(null, true));
    }
View Full Code Here

    @PostConstruct
    public void initWithTransactionBecauseAS75530() throws RuntimeException {
        startupBean.createStorageNodeVersionColumnIfNeeded();
        startupBean.createServerVersionColumnIfNeeded();
        LOG.info("Scheduling the initialization of the testing RHQ deployment");
        timerService.createSingleActionTimer(1, new TimerConfig(null, false)); // call StartupBean in 1ms
        startupBean.purgeTestServerAndStorageNodes();
        createTestServer();
        loadCassandraConnectionProps();
        createStorageNodes();
    }
View Full Code Here

                log.warn("Failed in attempting to cancel timer: " + existingTimer.toString());
            }
        }

        // timer that will trigger every 60 seconds
        timerService.createIntervalTimer(60000L, 60000L, new TimerConfig(null, false));
    }
View Full Code Here

                LOG.warn("Failed in attempting to cancel timer: " + existingTimer.toString());
            }
        }

        // timer that will trigger every 90 seconds after an initial wait of 30 seconds
        timerService.createIntervalTimer(30000L, 90000L, new TimerConfig(null, false));
    }
View Full Code Here

            } catch (Exception e) {
                log.warn("Failed in attempting to cancel timer: " + existingTimer.toString());
            }
        }
        // single-action timer that will trigger in 30 seconds
        timerService.createIntervalTimer(30000L, 30000L, new TimerConfig(null, false));
    }
View Full Code Here

        infoMap.put(AlertAvailabilityDurationJob.DATAMAP_RESOURCE_ID, String.valueOf(resource.getId()));
        infoMap.put(AlertAvailabilityDurationJob.DATAMAP_OPERATOR, operator);
        infoMap.put(AlertAvailabilityDurationJob.DATAMAP_DURATION, durationString); // in seconds
        infoMap.put(AlertAvailabilityDurationJob.DATAMAP_START_TIME, String.valueOf(startTime)); // in milliseconds

        timerService.createSingleActionTimer(duration, new TimerConfig(infoMap, false));
    }
View Full Code Here

            } catch (Exception e) {
                log.warn("Failed in attempting to cancel timer: " + existingTimer.toString());
            }
        }

        timerService.createIntervalTimer(30000L, 30000L, new TimerConfig(null, false));
    }
View Full Code Here

                LOG.warn("Failed in attempting to cancel timer: " + existingTimer.toString());
            }
        }

        // timer that will trigger every 60 seconds
        timerService.createIntervalTimer(60000L, 60000L, new TimerConfig(null, false));
    }
View Full Code Here

            } catch (Exception e) {
                log.warn("could not determine plugin scanner scan period - using: " + scanPeriod, e);
            }

            // create a non-persistent periodic timer (we'll reset it ever startup) with the scan period as configured in our scanner object
            timerService.createIntervalTimer(scanPeriod, scanPeriod, new TimerConfig(null, false));
        } catch (Exception e) {
            error += (error.isEmpty() ? "" : ", ") + "plugin scanner";
            throw new RuntimeException("Cannot schedule plugin scanning timer - new plugins will not be detected!", e);
        }
    }
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.