Revision f4335b0e
Added by Patrick Plitzner almost 8 years ago
eu.etaxonomy.taxeditor.webapp/src/main/java/eu/etaxonomy/taxeditor/webapp/CDMServer.java | ||
---|---|---|
106 | 106 |
WebAppContext webapp = new WebAppContext(); |
107 | 107 |
webapp.setContextPath(contextPath); |
108 | 108 |
webapp.setWar(warFile.getAbsolutePath()); |
109 |
webapp.setThrowUnavailableOnStartupException(true); |
|
109 | 110 |
|
110 | 111 |
server.setHandler(webapp); |
111 | 112 |
} |
... | ... | |
183 | 184 |
server.start(); |
184 | 185 |
server.join(); |
185 | 186 |
} catch (Throwable t) { |
186 |
cdmServerError.handleError(t); |
|
187 |
//wait for 1sec to get the right order of login dialog and error |
|
188 |
//message when connection fails |
|
189 |
try { |
|
190 |
Thread.sleep(1000); |
|
191 |
} catch (InterruptedException e) { |
|
192 |
} |
|
193 |
cdmServerError.handleError(new RuntimeException("Error during CDM server startup", t)); |
|
187 | 194 |
} |
188 | 195 |
} |
189 | 196 |
}; |
... | ... | |
204 | 211 |
return server.isStarted(); |
205 | 212 |
} |
206 | 213 |
|
214 |
public boolean isFailed() { |
|
215 |
return server.isFailed(); |
|
216 |
} |
|
217 |
|
|
207 | 218 |
public void stop() throws Exception { |
208 | 219 |
server.stop(); |
209 | 220 |
server.destroy(); |
Also available in: Unified diff
Throw exception when server startup fails #5812