Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- port
- 단축키
- tomcat
- xargs
- Windows 10
- context
- plugin
- web.xml
- IntelliJ
- ssh
- JavaScript
- maVen
- 줄바꿈 문자
- Eclipse
- Windows
- Mac
- find
- Source
- grep
- resource
- vscode
- netsh
- GIT
- bash
- Quartz
- VirtualBox
- lsof
- import
- profile
- 네트워크
Archives
- Today
- Total
develog
[Java] Quartz job fire manually (in JSP) 본문
// Quartz 1.8.6 <%! private void fireJobManually(ApplicationContext context, String triggerName, String refBeanNm) throws Exception { System.out.println(">> fireJobManually()"); StdScheduler scheduler = (StdScheduler) context.getBean("scheduler"); String[] triggerGroupNames = scheduler.getTriggerGroupNames(); String triggerGroup = triggerGroupNames[0]; String[] triggerNames = scheduler.getTriggerNames(triggerGroup); Trigger trigger = scheduler.getTrigger(triggerName, triggerGroup); System.out.println("scheduler : " + scheduler); System.out.println("triggerGroupNames : " + Arrays.toString(triggerGroupNames)); System.out.println("triggerGroup : " + triggerGroup); System.out.println("triggerNames : " + Arrays.toString(triggerNames)); System.out.println("trigger : " + trigger); String jobName = trigger.getJobName(); System.out.println(); System.out.println("jobName : " + jobName); System.out.println("triggerName : " + triggerName); System.out.println("triggerGroup : " + triggerGroup); JobDataMap jobDataMap = new JobDataMap(); if (refBeanNm != null) { jobDataMap.put(refBeanNm, context.getBean(refBeanNm)); } scheduler.triggerJob(jobName, triggerGroup, jobDataMap); } %> <% ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(Utils.getServletContext()); fireJobManually(context, "myTrigger", "myServiceBean"); %>
'Dev > Java' 카테고리의 다른 글
[Java] log4j (0) | 2016.05.29 |
---|---|
[Java] .class 버전 확인, javap (0) | 2016.03.27 |
JSP, download 구현시 (0) | 2015.03.05 |
[Java] password validation with regex (0) | 2015.02.03 |
[Maven] Eclipse, Maven, Dynamic Web Project (0) | 2014.12.21 |
Comments