Produced by Araxis Merge on 6/9/2017 3:51:24 PM 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 | Fri Jun 9 19:51:24 2017 UTC | ||
| 2 | eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-web\src\main\java\gov\va\nvap\web\app | AppStateListener.java | Fri Apr 21 20:03:30 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 83 |
| 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.nvap. web.app; | |||||
| 2 | ||||||
| 3 | import jav a.io.IOExc eption; | |||||
| 4 | import jav a.io.Input Stream; | |||||
| 5 | import jav a.io.Input StreamRead er; | |||||
| 6 | import jav a.io.LineN umberReade r; | |||||
| 7 | import jav a.util.Pro perties; | |||||
| 8 | import jav a.util.log ging.Level ; | |||||
| 9 | import jav a.util.log ging.Logge r; | |||||
| 10 | import jav ax.servlet .ServletCo ntextEvent ; | |||||
| 11 | import jav ax.servlet .ServletCo ntextListe ner; | |||||
| 12 | import org .apache.co mmons.logg ing.Log; | |||||
| 13 | import org .apache.co mmons.logg ing.LogFac tory; | |||||
| 14 | ||||||
| 15 | /** | |||||
| 16 | * Web app lication l ifecycle l istener. | |||||
| 17 | * | |||||
| 18 | * @author David Vaz quez Modif ied by: As ha Amritra j | |||||
| 19 | */ | |||||
| 20 | public cla ss AppStat eListener implements ServletCo ntextListe ner { | |||||
| 21 | ||||||
| 22 | static private L og LOG = L ogFactory. getLog(App StateListe ner.class) ; | |||||
| 23 | ||||||
| 24 | @Overr ide | |||||
| 25 | public void cont extDestroy ed(final S ervletCont extEvent s ce) { | |||||
| 26 | if (AppState Listener.L OG.isInfoE nabled()) { | |||||
| 27 | AppState Listener.L OG.info("V AP stopped ."); | |||||
| 28 | } | |||||
| 29 | } | |||||
| 30 | ||||||
| 31 | @Overr ide | |||||
| 32 | public void cont extInitial ized(final ServletCo ntextEvent sce) { | |||||
| 33 | // Get the v ersion fro m the MANI FEST.MF fi le | |||||
| 34 | tr y { | |||||
| 35 | InputStr eam in = s ce.getServ letContext ().getReso urceAsStre am("META-I NF/MANIFES T.MF"); | |||||
| 36 | in = sce .getServle tContext() .getResour ceAsStream ("META-INF /MANIFEST. MF"); | |||||
| 37 | ||||||
| 38 | if(in!=n ull){ | |||||
| 39 | in.c lose(); | |||||
| 40 | } | |||||
| 41 | ||||||
| 42 | final St ring versi on = this. getValueFr omManifest (in, "Buil d-VAP"); | |||||
| 43 | // Put t he build a nd version into the context | |||||
| 44 | sce.getS ervletCont ext().setA ttribute(" version", version); | |||||
| 45 | if (AppS tateListen er.LOG.isI nfoEnabled ()) { | |||||
| 46 | AppS tateListen er.LOG.inf o("VAP (" + version + ") start ed."); | |||||
| 47 | } | |||||
| 48 | ||||||
| 49 | Properti es propert ies = new Properties (); | |||||
| 50 | ||||||
| 51 | properti es.load(sc e.getServl etContext( ).getResou rceAsStrea m("/WEB-IN F/static.p roperties" )); | |||||
| 52 | sce.getS ervletCont ext().setA ttribute(" systemVers ion", prop erties.get Property(" system.ver sion")); | |||||
| 53 | sce.getS ervletCont ext().setA ttribute(" organizati onName", p roperties. getPropert y("exchang e.organiza tionName") ); | |||||
| 54 | sce.getS ervletCont ext().setA ttribute(" scheduledE xportMin", propertie s.getPrope rty("sched uled.expor t.min")); | |||||
| 55 | } catch (IOE xception e x) { | |||||
| 56 | Logger.g etLogger(A ppStateLis tener.clas s.getName( )).log(Lev el.SEVERE, null, ex) ; | |||||
| 57 | } | |||||
| 58 | } | |||||
| 59 | ||||||
| 60 | /** | |||||
| 61 | * Get the value from the MANIFEST F ile | |||||
| 62 | */ | |||||
| 63 | privat e String g etValueFro mManifest( final Inpu tStream in , | |||||
| 64 | fi nal String header) { | |||||
| 65 | St ring ret = null; | |||||
| 66 | fi nal LineNu mberReader reader = new LineNu mberReader ( | |||||
| 67 | new Inpu tStreamRea der(in)); | |||||
| 68 | ||||||
| 69 | tr y { | |||||
| 70 | String l ine = read er.readLin e(); | |||||
| 71 | while (( ret == nul l) && (lin e != null) ) { | |||||
| 72 | if ( line.start sWith(head er)) { | |||||
| 73 | ret = line .substring (line.inde xOf(":") + 1).trim() ; | |||||
| 74 | } | |||||
| 75 | line = reader. readLine() ; | |||||
| 76 | } | |||||
| 77 | } catch (fin al IOExcep tion ie) { | |||||
| 78 | ret = nu ll; | |||||
| 79 | } | |||||
| 80 | ||||||
| 81 | re turn ret; | |||||
| 82 | } | |||||
| 83 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.