Produced by Araxis Merge on 2/7/2017 12:14:06 PM Eastern Standard 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 | cpss.zip\cpss\src\main\java\gov\va\cpss\job\fps | FpsJobExecutionListener.java | Wed Feb 1 21:07:30 2017 UTC |
2 | cpss.zip\cpss\src\main\java\gov\va\cpss\job\fps | FpsJobExecutionListener.java | Fri Feb 3 20:45:31 2017 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 116 |
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 | package go v.va.cpss. job.fps; | |
2 | ||
3 | import sta tic gov.va .cpss.job. CbssJobPro cessingCon stants.JOB _FAILURE_K EY; | |
4 | import sta tic gov.va .cpss.job. CbssJobPro cessingCon stants.JOB _FAILURE_M ESSAGE_KEY ; | |
5 | ||
6 | import org .apache.lo g4j.Logger ; | |
7 | import org .springfra mework.bat ch.core.Ex itStatus; | |
8 | import org .springfra mework.bat ch.core.Jo bExecution ; | |
9 | import org .springfra mework.bat ch.core.Jo bExecution Listener; | |
10 | ||
11 | /** | |
12 | * Custom JobExecuti onListener used to p rocess cus tom exit s tatus to h andle read | |
13 | * and wri te errors during Pro cess FPS D ata batch job execut ion. | |
14 | * | |
15 | * @author DN S P II | |
16 | */ | |
17 | public cla ss FpsJobE xecutionLi stener imp lements Jo bExecution Listener { | |
18 | ||
19 | pr ivate fina l Logger r eaderLogge r; | |
20 | ||
21 | bo olean fail = false; | |
22 | ||
23 | pu blic FpsJo bExecution Listener() { | |
24 | read erLogger = Logger.ge tLogger(th is.getClas s().getCan onicalName ()); | |
25 | } | |
26 | ||
27 | @O verride | |
28 | pu blic void afterJob(J obExecutio n arg0) { | |
29 | ||
30 | if ( arg0.getEx ecutionCon text().con tainsKey(J OB_FAILURE _KEY)) { | |
31 | ||
32 | final String exi tStatus = arg0.getEx ecutionCon text().get String(JOB _FAILURE_K EY); | |
33 | ||
34 | if (ar g0.getExec utionConte xt().conta insKey(JOB _FAILURE_M ESSAGE_KEY )) { | |
35 | ||
36 | final St ring exitM essage = a rg0.getExe cutionCont ext().getS tring(JOB_ FAILURE_ME SSAGE_KEY) ; | |
37 | ||
38 | readerLo gger.error ("JobFailu re detecte d, setting exit stat us (" + ex itStatus + "): " + e xitMessage ); | |
39 | ||
40 | arg0.set ExitStatus (new ExitS tatus(exit Status, ex itMessage) ); | |
41 | } else { | |
42 | ||
43 | readerLo gger.error ("JobFailu re detecte d, setting exit stat us (" + ex itStatus + ")"); | |
44 | ||
45 | arg0.set ExitStatus (new ExitS tatus(exit Status)); | |
46 | } | |
47 | } el se { | |
48 | arg0.s etExitStat us(ExitSta tus.COMPLE TED); | |
49 | } | |
50 | ||
51 | read erLogger.i nfo("Endin g Job Exec ution"); | |
52 | } | |
53 | ||
54 | @O verride | |
55 | pu blic void beforeJob( JobExecuti on arg0) { | |
56 | read erLogger.i nfo("Begin ning Job E xecution") ; | |
57 | } | |
58 | ||
59 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.