Produced by Araxis Merge on 6/11/2019 10:54:15 AM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\scheduling | ScheduledJobListener.java | Wed May 29 15:26:22 2019 UTC |
| 2 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\scheduling | ScheduledJobListener.java | Mon Jun 10 19:27:47 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 278 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | /********* ********** ********** ********** ********** ********** ********* | |
| 2 | * Copyrii ght 2004 V HA. All ri ghts reser ved | |
| 3 | ********* ********** ********** ********** ********** ********** *********/ | |
| 4 | // Package | |
| 5 | package go v.va.med.f w.scheduli ng; | |
| 6 | ||
| 7 | // Java cl asses | |
| 8 | import jav a.io.Print Writer; | |
| 9 | import jav a.io.Strin gWriter; | |
| 10 | import jav a.text.Mes sageFormat ; | |
| 11 | import jav a.util.Cal endar; | |
| 12 | ||
| 13 | import org .apache.co mmons.lang .ClassUtil s; | |
| 14 | import org .quartz.Jo bExecution Context; | |
| 15 | import org .quartz.Jo bExecution Exception; | |
| 16 | import org .quartz.Jo bListener; | |
| 17 | import org .quartz.Tr igger; | |
| 18 | ||
| 19 | import gov .va.med.fw .service.A bstractCom ponent; | |
| 20 | ||
| 21 | // ESR cla sses | |
| 22 | ||
| 23 | /** | |
| 24 | * Provide s detail l ogging inf o for a sc heduled jo b in its l ife cycle | |
| 25 | * | |
| 26 | * Project : Framewor k</br> Cre ated on: 3 :48:17 PM </br> | |
| 27 | * | |
| 28 | * @author DN S
|
|
| 29 | */ | |
| 30 | public cla ss Schedul edJobListe ner extend s Abstract Component implements JobListen er { | |
| 31 | ||
| 32 | /* * | |
| 33 | * An instan ce of jobT oBeFiredMe ssage | |
| 34 | * / | |
| 35 | pr ivate Stri ng jobToBe FiredMessa ge = "Job {1}.{0} fi red (by tr igger {4}. {3}) at: { 2, date, H H:mm:ss MM /dd/yyyy}" ; | |
| 36 | ||
| 37 | /* * | |
| 38 | * An instan ce of jobS uccessMess age | |
| 39 | * / | |
| 40 | pr ivate Stri ng jobSucc essMessage = "Job {1 }.{0} exec ution comp lete at {2 , date, HH :mm:ss MM/ dd/yyyy}. Next fire d time is {3}"; | |
| 41 | ||
| 42 | /* * | |
| 43 | * An instan ce of jobF ailedMessa ge | |
| 44 | * / | |
| 45 | pr ivate Stri ng jobFail edMessage = "Job {1} .{0} execu tion faile d at {2, d ate, HH:mm :ss MM/dd/ yyyy} due to [{3}]. Next fire d time is {4}"; | |
| 46 | ||
| 47 | /* * | |
| 48 | * An instan ce of jobW asVetoedMe ssage | |
| 49 | * / | |
| 50 | pr ivate Stri ng jobWasV etoedMessa ge = "Job {1}.{0} wa s vetoed. It was to be fired (by trigge r {4}.{3}) at: {2, d ate, HH:mm :ss MM/dd/ yyyy}"; | |
| 51 | ||
| 52 | /* * | |
| 53 | * An instan ce of name | |
| 54 | * / | |
| 55 | pr ivate Stri ng name = null; | |
| 56 | ||
| 57 | /* * | |
| 58 | * A default construct or | |
| 59 | * / | |
| 60 | pu blic Sched uledJobLis tener() { | |
| 61 | supe r(); | |
| 62 | } | |
| 63 | ||
| 64 | /* * | |
| 65 | * @see gov. va.med.fw. service.Ab stractComp onent#afte rPropertie sSet() | |
| 66 | * / | |
| 67 | pu blic void afterPrope rtiesSet() throws Ex ception { | |
| 68 | supe r.afterPro pertiesSet (); | |
| 69 | this .name = th is.getBean Name(); | |
| 70 | } | |
| 71 | ||
| 72 | /* * | |
| 73 | * @see org. quartz.Job Listener#g etName() | |
| 74 | * / | |
| 75 | pu blic Strin g getName( ) { | |
| 76 | retu rn this.na me; | |
| 77 | } | |
| 78 | ||
| 79 | /* * | |
| 80 | * @see org. quartz.Job Listener#j obToBeExec uted(org.q uartz.JobE xecutionCo ntext) | |
| 81 | * / | |
| 82 | pu blic void jobToBeExe cuted(JobE xecutionCo ntext cont ext) { | |
| 83 | if ( logger.isI nfoEnabled ()) { | |
| 84 | ||
| 85 | Trigge r trigger = context. getTrigger (); | |
| 86 | Object [] args = { context. getJobDeta il().getKe y().getNam e(), conte xt.getJobD etail().ge tKey().get Group(), | |
| 87 | Calendar.g etInstance ().getTime (), trigge r.getKey() .getName() , trigger. getKey().g etGroup() }; | |
| 88 | logger .info(Clas sUtils.get ShortClass Name(getCl ass()) + " .jobToBeEx ecuted"); | |
| 89 | logger .info(Mess ageFormat. format(thi s.jobToBeF iredMessag e, args)); | |
| 90 | } | |
| 91 | } | |
| 92 | ||
| 93 | /* * | |
| 94 | * @see org. quartz.Job Listener#j obExecutio nVetoed(or g.quartz.J obExecutio nContext) | |
| 95 | * / | |
| 96 | pu blic void jobExecuti onVetoed(J obExecutio nContext c ontext) { | |
| 97 | if ( logger.isI nfoEnabled ()) { | |
| 98 | ||
| 99 | Trigge r trigger = context. getTrigger (); | |
| 100 | Object [] args = { context. getJobDeta il().getKe y().getNam e(), conte xt.getJobD etail().ge tKey().get Group(), | |
| 101 | Calendar.g etInstance ().getTime (), trigge r.getKey() .getName() , trigger. getKey().g etGroup() }; | |
| 102 | ||
| 103 | logger .info(Clas sUtils.get ShortClass Name(getCl ass()) + " .jobExecut ionVetoed" ); | |
| 104 | logger .info(Mess ageFormat. format(thi s.jobWasVe toedMessag e, args)); | |
| 105 | } | |
| 106 | } | |
| 107 | ||
| 108 | /* * | |
| 109 | * @see org. quartz.Job Listener#j obWasExecu ted(org.qu artz.JobEx ecutionCon text, | |
| 110 | * org. quartz.Job ExecutionE xception) | |
| 111 | * / | |
| 112 | pu blic void jobWasExec uted(JobEx ecutionCon text conte xt, JobExe cutionExce ption exce ption) { | |
| 113 | ||
| 114 | Trig ger trigge r = contex t.getTrigg er(); | |
| 115 | if ( exception != null) { | |
| 116 | if (lo gger.isInf oEnabled() ) { | |
| 117 | logger.i nfo(ClassU tils.getSh ortClassNa me(getClas s()) + ".j obWasExecu ted"); | |
| 118 | Object[] args = ne w Object[] { context .getJobDet ail().getK ey().getNa me(), | |
| 119 | co ntext.getJ obDetail() .getKey(). getGroup() , Calendar .getInstan ce().getTi me(), | |
| 120 | ex ception.ge tMessage() , trigger. getNextFir eTime() }; | |
| 121 | ||
| 122 | logger.i nfo(Messag eFormat.fo rmat(this. jobFailedM essage, ar gs)); | |
| 123 | ||
| 124 | StringWr iter error Writer = n ew StringW riter(); | |
| 125 | PrintWri ter printW riter = ne w PrintWri ter(errorW riter); | |
| 126 | exceptio n.printSta ckTrace(pr intWriter) ; | |
| 127 | printWri ter.flush( ); | |
| 128 | logger.i nfo("Detai l Stack Tr ace: " + e rrorWriter .toString( )); | |
| 129 | } | |
| 130 | } el se { | |
| 131 | if (lo gger.isInf oEnabled() ) { | |
| 132 | logger.i nfo(ClassU tils.getSh ortClassNa me(getClas s()) + ".j obWasExecu ted"); | |
| 133 | Object[] args = ne w Object[] { context .getJobDet ail().getK ey().getNa me(), | |
| 134 | co ntext.getJ obDetail() .getKey(). getGroup() , Calendar .getInstan ce().getTi me(), | |
| 135 | tr igger.getN extFireTim e() }; | |
| 136 | logger.i nfo(Messag eFormat.fo rmat(this. jobSuccess Message, a rgs)); | |
| 137 | } | |
| 138 | } | |
| 139 | } | |
| 140 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.