Produced by Araxis Merge on 6/5/2018 10:24:09 AM Central 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 | patch_205_build_9.zip\Java\HDIGManagementWebApp\main\src\java\gov\va\med\imaging\hdigmanagement\web | StartOrStopDicomServicesServlet.java | Wed May 30 14:35:26 2018 UTC |
2 | patch_205_build_9.zip\Java\HDIGManagementWebApp\main\src\java\gov\va\med\imaging\hdigmanagement\web | StartOrStopDicomServicesServlet.java | Fri Jun 1 20:13:06 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 244 |
Changed | 2 | 4 |
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 | * | |
3 | Package: MAG - Vis tA Imaging | |
4 | WARNING: Per VHA D irective 2 004-038, t his routin e should n ot be modi fied. | |
5 | Date Cre ated: Apr 25, 2012 | |
6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
7 | Developer: PI I
|
|
8 | Descript ion: | |
9 | ||
10 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
11 | ;; Property of the US Government . | |
12 | ;; No permis sion to co py or redi stribute t his softwa re is give n. | |
13 | ;; Use of un released v ersions of this soft ware requi res the us er | |
14 | ;; to execu te a writt en test ag reement wi th the Vis tA Imaging | |
15 | ;; Developm ent Office of the De partment o f Veterans Affairs, | |
16 | ;; telephon e (301) 73 4-0100. | |
17 | ;; | |
18 | ;; The Food and Drug A dministrat ion classi fies this software a s | |
19 | ;; a Class I I medical device. A s such, it may not b e changed | |
20 | ;; in any wa y. Modifi cations to this soft ware may r esult in a n | |
21 | ;; adulterat ed medical device un der 21CFR8 20, the us e of which | |
22 | ;; is consid ered to be a violati on of US F ederal Sta tutes. | |
23 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
24 | ||
25 | */ | |
26 | package go v.va.med.i maging.hdi gmanagemen t.web; | |
27 | ||
28 | import gov .va.med.im aging.core .router.Pe riodicComm andList; | |
29 | import gov .va.med.im aging.core .router.co mmands.Pro cessEmailQ ueueComman dImpl; | |
30 | import gov .va.med.im aging.core .router.co mmands.Pro cessIconIm ageCreatio nQueueComm andImpl; | |
31 | import gov .va.med.im aging.core .router.co mmands.dic om.Process DicomCorre ctCommandI mpl; | |
32 | import gov .va.med.im aging.core .router.co mmands.Pro cessAsyncS torageQueu eSendEmail CommandImp l; | |
33 | import gov .va.med.im aging.core .router.pe riodiccomm ands.Perio dicCommand EngineAdap ter; | |
34 | import gov .va.med.im aging.dico m.dcftoolk it.startup .DicomEngi neAdapter; | |
35 | import gov .va.med.im aging.exch ange.busin ess.dicom. DicomServe rConfigura tion; | |
36 | import gov .va.med.im aging.faca de.configu ration.Enc ryptedConf igurationP ropertyStr ing; | |
37 | import gov .va.med.im aging.faca de.configu ration.Fac adeConfigu rationFact ory; | |
38 | import gov .va.med.im aging.noti fications. Notificati onTypes; | |
39 | import gov .va.med.im aging.noti fications. email.Noti ficationEm ailConfigu ration; | |
40 | ||
41 | import jav a.io.IOExc eption; | |
42 | ||
43 | import jav ax.servlet .ServletEx ception; | |
44 | import jav ax.servlet .http.Http Servlet; | |
45 | import jav ax.servlet .http.Http ServletReq uest; | |
46 | import jav ax.servlet .http.Http ServletRes ponse; | |
47 | ||
48 | import org .apache.lo gging.log4 j.LogManag er; | |
49 | import org .apache.lo gging.log4 j.Logger; | |
50 | ||
51 | /** | |
52 | * @author PI I
|
|
53 | * | |
54 | */ | |
55 | public cla ss StartOr StopDicomS ervicesSer vlet | |
56 | extends Ht tpServlet | |
57 | { | |
58 | pr ivate stat ic final l ong serial VersionUID = -185097 6585167762 873L; | |
59 | pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Star tOrStopDic omServices Servlet.cl ass); | |
60 | ||
61 | @O verride | |
62 | pr otected vo id doPost( HttpServle tRequest r equest, Ht tpServletR esponse re sponse) | |
63 | th rows Servl etExceptio n, IOExcep tion | |
64 | { | |
65 | Stri ng action = request. getParamet er("action "); | |
66 | if ( action.equ als("Cance l")) | |
67 | { | |
68 | respon se.sendRed irect("../ ViewHDIGSt ats.jsp"); | |
69 | } | |
70 | else if (!Dico mEngineAda pter.isVal idCredenti als()) | |
71 | { | |
72 | respon se.sendRed irect("upd ateService AccountCre dentials.j sp"); | |
73 | } | |
74 | else if (actio n.equals(" Start DICO M Services ")) | |
75 | { | |
76 | try | |
77 | { | |
78 | // Start the DICOM services | |
79 | DicomEng ineAdapter .startDico mServices( ); | |
80 | ||
81 | // Kill any existi ng DICOM p eriodic co mmands, ju st to be s afe | |
82 | Periodic CommandLis t.get().te rminateSch eduledPeri odicComman d(ProcessD icomCorrec tCommandIm pl.class); | |
83 | Periodic CommandLis t.get().te rminateSch eduledPeri odicComman d(ProcessI conImageCr eationQueu eCommandIm pl.class); | |
84 | Periodic CommandLis t.get().te rminateSch eduledPeri odicComman d(ProcessA syncStorag eQueueSend EmailComma ndImpl.cla ss); | |
85 | Periodic CommandLis t.get().te rminateSch eduledPeri odicComman d(ProcessE mailQueueC ommandImpl .class); | |
86 | ||
87 | // Start new perio dic comman ds | |
88 | Periodic CommandEng ineAdapter .initializ eAndStartP eriodicCom mands(); | |
89 | response .sendRedir ect("../se cure/start OrStopDico mServices. jsp"); | |
90 | } | |
91 | catch( Exception ex) | |
92 | { | |
93 | logger.e rror("Erro r updating DICOM Ser ver Config uration, " + ex.getM essage(), ex); | |
94 | response .sendRedir ect("start OrStopServ ices.jsp?e rror=There was an er ror restar ting DICOM services ( " + ex.g etMessage( ) + "). Th e Tomcat s ervice on the HDIG s hould be r estarted." ); | |
95 | } | |
96 | } | |
97 | else if (actio n.equals(" Stop DICOM Services" )) | |
98 | { | |
99 | try | |
100 | { | |
101 | // Stop the DICOM services | |
102 | DicomEng ineAdapter .stopListe ners(); | |
103 | ||
104 | // Kill any existi ng periodi c commands | |
105 | Periodic CommandLis t.get().te rminateSch eduledPeri odicComman d(ProcessD icomCorrec tCommandIm pl.class); | |
106 | Periodic CommandLis t.get().te rminateSch eduledPeri odicComman d(ProcessI conImageCr eationQueu eCommandIm pl.class); | |
107 | Periodic CommandLis t.get().te rminateSch eduledPeri odicComman d(ProcessA syncStorag eQueueSend EmailComma ndImpl.cla ss); | |
108 | Periodic CommandLis t.get().te rminateSch eduledPeri odicComman d(ProcessE mailQueueC ommandImpl .class); | |
109 | ||
110 | // Start new perio dic comman ds | |
111 | Periodic CommandEng ineAdapter | |
112 | .i nitializeA ndStartPer iodicComma nds(); | |
113 | ||
114 | response .sendRedir ect("../se cure/start OrStopDico mServices. jsp"); | |
115 | } | |
116 | catch( Exception ex) | |
117 | { | |
118 | logger.e rror("Erro r updating DICOM Ser ver Config uration, " + ex.getM essage(), ex); | |
119 | response .sendRedir ect("../se cure/start OrStopDico mServices. jsp?error= There was an error r estarting DICOM serv ices ( " + ex.getMes sage() + " ). The Tom cat servic e on the H DIG should be restar ted."); | |
120 | } | |
121 | } | |
122 | } | |
123 | ||
124 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.