Revision 0d7b39c7
Added by Andreas Kohlbecker almost 5 years ago
src/main/java/eu/etaxonomy/cdm/server/instance/StartupQueue.java | ||
---|---|---|
182 | 182 |
@Override |
183 | 183 |
public void run() { |
184 | 184 |
try { |
185 |
instance.getWebAppContext().setThrowUnavailableOnStartupException(true); |
|
185 | 186 |
instance.getWebAppContext().start(); |
186 | 187 |
// release reference to the instance so |
187 | 188 |
// that the thread can be garbage collected |
188 | 189 |
instance = null; |
189 |
} |
|
190 |
catch(InterruptedException e) { |
|
190 |
} catch(InterruptedException e) { |
|
191 | 191 |
try { |
192 | 192 |
instance.getWebAppContext().stop(); |
193 | 193 |
} catch (Exception e1) { |
194 | 194 |
logger.error("Error on stopping instance", e1); |
195 | 195 |
notifyInstanceFailed(instance); |
196 | 196 |
} |
197 |
} catch (Exception e) {
|
|
197 |
} catch (Throwable e) {
|
|
198 | 198 |
logger.error("Could not start " + instance.getWebAppContext().getContextPath(), e); |
199 | 199 |
instance.getProblems().add(e.getMessage()); |
200 | 200 |
instance.setStatus(Status.error); |
201 | 201 |
notifyInstanceFailed(instance); |
202 |
try { |
|
203 |
// try to stop |
|
204 |
instance.getWebAppContext().stop(); |
|
205 |
} catch (Exception e1) { |
|
206 |
/* IGNORE */ |
|
207 |
} |
|
202 | 208 |
} |
203 | 209 |
|
204 | 210 |
} |
Also available in: Unified diff
fix #5774 configuring webapp contexts to re-throw errors on startup