Produced by Araxis Merge on 12/13/2018 10:35:30 AM 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 | v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\scheduling | CustomSchedulerFactory.java | Fri Dec 7 17:36:20 2018 UTC |
| 2 | v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\scheduling | CustomSchedulerFactory.java | Wed Dec 12 22:26:42 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 164 |
| 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 2006 V HA. All ri ghts reser ved | |
| 3 | ********* ********** ********** ********** ********** ********** *********/ | |
| 4 | ||
| 5 | package go v.va.med.f w.scheduli ng; | |
| 6 | ||
| 7 | import jav a.util.Pro perties; | |
| 8 | ||
| 9 | import org .apache.co mmons.logg ing.Log; | |
| 10 | import org .apache.co mmons.logg ing.LogFac tory; | |
| 11 | import org .quartz.Sc hedulerExc eption; | |
| 12 | import org .quartz.im pl.StdSche dulerFacto ry; | |
| 13 | import org .springfra mework.sch eduling.qu artz.Local DataSource JobStore; | |
| 14 | ||
| 15 | /** | |
| 16 | * Custom SchedulerF actory tha t provides custom Jo bStore beh avior via | |
| 17 | * Persist entJobStor e. Primari ly needed because Sp ring does not provid e a way to | |
| 18 | * inject usage of a custom Jo bStore. | |
| 19 | * | |
| 20 | * <p> | |
| 21 | * Not a S pring mana ged bean s ince it is instantia ted via re flection i n | |
| 22 | * Schedul erFactoryB ean | |
| 23 | * | |
| 24 | * <p> | |
| 25 | * CAN BE REMOVED AF TER QUARTZ 1.6.x INT EGRATION, although c ould exist beyond | |
| 26 | * that fo r JobStore injection (given Sp ring 2.x s upports th at). | |
| 27 | * | |
| 28 | * Created Nov 2, 20 06 3:44:29 PM | |
| 29 | * | |
| 30 | * DNS | |
| 31 | */ | |
| 32 | public cla ss CustomS chedulerFa ctory exte nds StdSch edulerFact ory { | |
| 33 | pr otected fi nal Log lo gger = Log Factory.ge tLog(getCl ass()); | |
| 34 | pr ivate Clas s jobStore Class = Pe rsistentJo bStore.cla ss; | |
| 35 | pr ivate stat ic Class S PRING_PERS ISTENT_JOB _STORE = L ocalDataSo urceJobSto re.class; | |
| 36 | ||
| 37 | /* * | |
| 38 | * invoked f rom Spring Scheduler FactoryBea n.initSche dulerFacto ry | |
| 39 | * / | |
| 40 | pu blic void initialize (Propertie s props) t hrows Sche dulerExcep tion { | |
| 41 | if ( jobStoreCl ass != nul l) { | |
| 42 | boolea n replaced = false; | |
| 43 | String oldValue = (String) props.get (PROP_JOB_ STORE_CLAS S); | |
| 44 | // if Spring was using a p ersistent JobStore, replace wi th custom | |
| 45 | // one ... | |
| 46 | if (SP RING_PERSI STENT_JOB_ STORE.getN ame().equa ls(oldValu e)) { | |
| 47 | // ....b ut only if it extend s from SPR ING_PERSIS TENT_JOB_S TORE | |
| 48 | // (pres erves Spri ng value a dded) | |
| 49 | if (SPRI NG_PERSIST ENT_JOB_ST ORE.isAssi gnableFrom (jobStoreC lass)) { | |
| 50 | replaced = true; | |
| 51 | props.put( PROP_JOB_S TORE_CLASS , jobStore Class.getN ame()); | |
| 52 | } | |
| 53 | } else { | |
| 54 | // this means Spri ng is not using a pe rsistent j ob store, so use | |
| 55 | // this custom one if not pe rsistent | |
| 56 | if (!SPR ING_PERSIS TENT_JOB_S TORE.isAss ignableFro m(jobStore Class)) { | |
| 57 | replaced = true; | |
| 58 | props.put( PROP_JOB_S TORE_CLASS , jobStore Class.getN ame()); | |
| 59 | } | |
| 60 | } | |
| 61 | if (re placed && logger.isW arnEnabled ()) { | |
| 62 | logger.w arn("Custo mScheduler Factory ov erruled us age of Job Store [" + oldValue | |
| 63 | + "] in favo r of more robust [" + jobStore Class.getN ame() + "] "); | |
| 64 | } | |
| 65 | } | |
| 66 | supe r.initiali ze(props); | |
| 67 | } | |
| 68 | ||
| 69 | /* * | |
| 70 | * @return R eturns the jobStoreC lass. | |
| 71 | * / | |
| 72 | pu blic Class getJobSto reClass() { | |
| 73 | retu rn jobStor eClass; | |
| 74 | } | |
| 75 | ||
| 76 | /* * | |
| 77 | * @param jo bStoreClas s | |
| 78 | * The jobS toreClass to set. | |
| 79 | * / | |
| 80 | pu blic void setJobStor eClass(Cla ss jobStor eClass) { | |
| 81 | this .jobStoreC lass = job StoreClass ; | |
| 82 | } | |
| 83 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.