| | |
| | | * @throws ApplicationException if things go wrong |
| | | */ |
| | | public void checkServer() throws ApplicationException { |
| | | InProcessServerController control = |
| | | new InProcessServerController(installation); |
| | | InProcessServerController control = null; |
| | | try { |
| | | control = new InProcessServerController(installation); |
| | | if (installation.getStatus().isServerRunning()) { |
| | | new ServerController(installation).stopServer(); |
| | | } |
| | |
| | | "tool: " + e.getLocalizedMessage(), e); |
| | | } |
| | | } finally { |
| | | control.stopServer(); |
| | | if (control != null) { |
| | | control.stopServer(); |
| | | } |
| | | } |
| | | } |
| | | |