Package javax.ejb

Examples of javax.ejb.ScheduleExpression.dayOfMonth()


    public TimerHandle createTimer() {
        ScheduleExpression expression = new ScheduleExpression();
        expression.second("*");
        expression.minute("*");
        expression.hour("*");
        expression.dayOfMonth("*");
        expression.year("*");
        TimerConfig timerConfig = new TimerConfig();
        timerConfig.setInfo(new String("info"));
        return timerService.createCalendarTimer(expression, timerConfig).getHandle();
    }
View Full Code Here


            final ScheduleExpression expr = new ScheduleExpression();
            expr.second(scheduleInfo.second == null ? "0" : scheduleInfo.second);
            expr.minute(scheduleInfo.minute == null ? "0" : scheduleInfo.minute);
            expr.hour(scheduleInfo.hour == null ? "0" : scheduleInfo.hour);
            expr.dayOfWeek(scheduleInfo.dayOfWeek == null ? "*" : scheduleInfo.dayOfWeek);
            expr.dayOfMonth(scheduleInfo.dayOfMonth == null ? "*" : scheduleInfo.dayOfMonth);
            expr.month(scheduleInfo.month == null ? "*" : scheduleInfo.month);
            expr.year(scheduleInfo.year == null ? "*" : scheduleInfo.year);
            expr.timezone(scheduleInfo.timezone);
            expr.start(scheduleInfo.start);
            expr.end(scheduleInfo.end);
View Full Code Here

    private ScheduleExpression copy(final ScheduleExpression scheduleExpression) {
        final ScheduleExpression scheduleExpressionCopy = new ScheduleExpression();
        scheduleExpressionCopy.year(scheduleExpression.getYear());
        scheduleExpressionCopy.month(scheduleExpression.getMonth());
        scheduleExpressionCopy.dayOfMonth(scheduleExpression.getDayOfMonth());
        scheduleExpressionCopy.dayOfWeek(scheduleExpression.getDayOfWeek());
        scheduleExpressionCopy.hour(scheduleExpression.getHour());
        scheduleExpressionCopy.minute(scheduleExpression.getMinute());
        scheduleExpressionCopy.second(scheduleExpression.getSecond());
        scheduleExpressionCopy.start(scheduleExpression.getStart());
View Full Code Here

            final Calendar calendar = Calendar.getInstance();
            calendar.add(Calendar.SECOND, 2);
            se.second(calendar.get(Calendar.SECOND) + "/3");
            se.minute("*");
            se.hour("*");
            se.dayOfMonth("*");
            se.dayOfWeek("*");
            se.month("*");
            timer = timerService.createCalendarTimer(se, tc);
        }
    }
View Full Code Here

            final Calendar calendar = Calendar.getInstance();
            calendar.add(Calendar.SECOND, 2);
            se.second(calendar.get(Calendar.SECOND) + "/3");
            se.minute("*");
            se.hour("*");
            se.dayOfMonth("*");
            se.dayOfWeek("*");
            se.month("*");
            timer = timerService.createCalendarTimer(se, tc);
        }
    }
View Full Code Here

                    ScheduleExpression expr = new ScheduleExpression();
                    expr.second(scheduleInfo.second);
                    expr.minute(scheduleInfo.minute);
                    expr.hour(scheduleInfo.hour);
                    expr.dayOfWeek(scheduleInfo.dayOfWeek);
                    expr.dayOfMonth(scheduleInfo.dayOfMonth);
                    expr.month(scheduleInfo.month);
                    expr.year(scheduleInfo.year);

                    TimerConfig config = new TimerConfig();
                    config.setInfo(scheduleInfo.info);
View Full Code Here

            final Calendar calendar = Calendar.getInstance();
            calendar.add(Calendar.SECOND, 2);
            se.second(calendar.get(Calendar.SECOND) + "/3");
            se.minute("*");
            se.hour("*");
            se.dayOfMonth("*");
            se.dayOfWeek("*");
            se.month("*");
            timer = timerService.createCalendarTimer(se, tc);
        }
    }
View Full Code Here

            final Calendar calendar = Calendar.getInstance();
            calendar.add(Calendar.SECOND, 2);
            se.second(calendar.get(Calendar.SECOND) + "/3");
            se.minute("*");
            se.hour("*");
            se.dayOfMonth("*");
            se.dayOfWeek("*");
            se.month("*");
            timer = timerService.createCalendarTimer(se, tc);
        }
    }
View Full Code Here

            final Calendar calendar = Calendar.getInstance();
            calendar.add(Calendar.SECOND, 2);
            se.second(calendar.get(Calendar.SECOND) + "/3");
            se.minute("*");
            se.hour("*");
            se.dayOfMonth("*");
            se.dayOfWeek("*");
            se.month("*");
            timer = timerService.createCalendarTimer(se, tc);
        }
    }
View Full Code Here

                    autoTimer.getTimerConfig().setPersistent(timer.isPersistent());

                    final ScheduleExpression scheduleExpression = autoTimer.getScheduleExpression();
                    final ScheduleMetaData schedule = timer.getSchedule();
                    if (schedule != null) {
                        scheduleExpression.dayOfMonth(schedule.getDayOfMonth());
                        scheduleExpression.dayOfWeek(schedule.getDayOfWeek());
                        scheduleExpression.hour(schedule.getHour());
                        scheduleExpression.minute(schedule.getMinute());
                        scheduleExpression.month(schedule.getMonth());
                        scheduleExpression.second(schedule.getSecond());
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.