370. EPMO Open Source Coordination Office Redaction File Detail Report

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.

370.1 Files compared

# Location File Last Modified
1 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\scheduling ClusterAwareSchedulerFactoryBean.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 ClusterAwareSchedulerFactoryBean.java Wed Dec 12 22:26:42 2018 UTC

370.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 178
Changed 1 2
Inserted 0 0
Removed 0 0

370.3 Comparison options

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

370.4 Active regular expressions

No regular expressions were active.

370.5 Comparison detail

  1   /********* ********** ********** ********** ********** ********** *********
  2    * Copyrii ght 2005 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.util.Pro perties;
  9  
  10   import org .springfra mework.sch eduling.qu artz.Sched ulerFactor yBean;
  11  
  12   /**
  13    * Schedul erFactoryB ean that d oes not al low the us e of a Dat aSource (p ersistent
  14    * JobStor e) in a no n-clustere d environm ent.
  15    * 
  16    * Created  Mar 8, 20 06 3:31:32  PM
  17    * 
  18    * DNS
  19    * @histor y: Modifie d and adde d comments  - VL
  20    */
  21   public cla ss Cluster AwareSched ulerFactor yBean exte nds Schedu lerFactory Bean {
  22  
  23           pu blic stati c final St ring SCHED ULER_AUTO_ START = "o rg.quartz. scheduler. autoStart" ;
  24  
  25           pr ivate bool ean isClus tered = fa lse;
  26  
  27           /* *
  28            *  A default  construct or
  29            * /
  30           pu blic Clust erAwareSch edulerFact oryBean()  {
  31                    supe r();
  32           }
  33  
  34           pu blic void  afterPrope rtiesSet()  throws Ex ception {
  35  
  36                    //
  37                    // T here are 2  things we  need to o verride in  Scheduler FactoryBea n
  38                    // i mplementat ion
  39                    //
  40                    // 1 . Usage of  data sour ce when se t
  41                    // 2 . Initiali ze propert ies that d on't apply  to RAMJob Store
  42                    //
  43                    // I n developm ent enviro nment, to  avoid over lapping wo rks betwee n
  44                    // d evelopers,  RAMJobSto re
  45                    // i s encourge d in conju nction wit h single i nstance of  Scheduler  while
  46                    // i n producti on
  47                    // e nvironment , schedule rs should  be configu red in a c luster alo ng with
  48                    // J obStoreCMT  - VL
  49  
  50                    // C heck if or g.quartz.j obStore.is Clustered  property i s set. uns et
  51                    // D ataSource  in dev env .
  52                    if ( !isCluster ed) {
  53                             setDat aSource(nu ll);
  54                    }
  55  
  56                    // O nly turn o ff the sch edule if a  flag is s et to fals e
  57                    Stri ng flag =  System.get Property(S CHEDULER_A UTO_START) ;
  58                    bool ean startS cheduler =  flag != n ull && Boo lean.FALSE .equals(Bo olean.valu eOf(flag))  ? false
  59                                      : true;
  60                    supe r.setAutoS tartup(sta rtSchedule r);
  61  
  62                    supe r.afterPro pertiesSet ();
  63           }
  64  
  65           pu blic void  setQuartzP roperties( Properties  props) {
  66  
  67                    //
  68                    // I f "org.qua rtz.jobSto re.isClust ered" prop erty is se t, it mean s that
  69                    // E SR is depl oyed into  a clustere d environm ent which  uses JobSt oreCMT
  70                    // 
  71                    // I f "org.qua rtz.jobSto re.isClust ered" prop erty is no t set, it  means
  72                    // t hat ESR is  deployed  in a singl e local se rver and R AMJobStore  is
  73                    // u sed.
  74                    // R emove prop erties tha t don't ap ply to RAM JobStore.  - VL
  75                    //
  76                    Obje ct obj = p rops.get(" org.quartz .jobStore. isClustere d");
  77                    Stri ng value =  obj insta nceof Stri ng ? (Stri ng) obj :  null;
  78                    this .isCluster ed = props  != null ?  Boolean.v alueOf(val ue).boolea nValue() :  false;
  79                    if ( !isCluster ed && prop s != null)  {
  80                             // rem ove these  settings o r else Qua rtz compla ins
  81                             // whe n not usin g a persis tent JobSt ore
  82                             props. remove("or g.quartz.j obStore.ta blePrefix" );
  83                             props. remove("or g.quartz.j obStore.us ePropertie s");
  84                             props. remove("or g.quartz.j obStore.dr iverDelega teClass");
  85                             props. remove("or g.quartz.j obStore.is Clustered" );
  86                             props. remove("or g.quartz.j obStore.cl usterCheck inInterval ");
  87                    }
  88                    supe r.setQuart zPropertie s(props);
  89           }
  90   }