aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-12-20 18:05:48 +0100
committersimonbrandhof <simon.brandhof@gmail.com>2011-12-20 18:05:48 +0100
commit44096503cea425a43632dfa3e58da2cc1d28a35b (patch)
tree33fc0eb3305ce523d9b0653a92cc8322716fdb01
parent8bfaeb3585098baa8914fe10d8bcd219f6f65da1 (diff)
downloadsonarqube-44096503cea425a43632dfa3e58da2cc1d28a35b.tar.gz
sonarqube-44096503cea425a43632dfa3e58da2cc1d28a35b.zip
SONAR-3107 do not hide initial exception when server components fail to start
-rw-r--r--sonar-server/src/main/java/org/sonar/server/platform/Platform.java44
1 files changed, 22 insertions, 22 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/platform/Platform.java b/sonar-server/src/main/java/org/sonar/server/platform/Platform.java
index a67b40b3271..c86f5f93477 100644
--- a/sonar-server/src/main/java/org/sonar/server/platform/Platform.java
+++ b/sonar-server/src/main/java/org/sonar/server/platform/Platform.java
@@ -220,30 +220,30 @@ public final class Platform {
private void executeStartupTasks() {
ComponentContainer startupContainer = servicesContainer.createChild();
- try {
- startupContainer.addSingleton(MavenRepository.class);
- startupContainer.addSingleton(GwtPublisher.class);
- startupContainer.addSingleton(RegisterMetrics.class);
- startupContainer.addSingleton(RegisterRules.class);
- startupContainer.addSingleton(RegisterProvidedProfiles.class);
- startupContainer.addSingleton(EnableProfiles.class);
- startupContainer.addSingleton(ActivateDefaultProfiles.class);
- startupContainer.addSingleton(JdbcDriverDeployer.class);
- startupContainer.addSingleton(ServerMetadataPersister.class);
- startupContainer.addSingleton(RegisterQualityModels.class);
- startupContainer.addSingleton(DeleteDeprecatedMeasures.class);
- startupContainer.addSingleton(GeneratePluginIndex.class);
- startupContainer.addSingleton(RegisterNewDashboards.class);
- startupContainer.addSingleton(IndexProjects.class);
- startupContainer.startComponents();
+ startupContainer.addSingleton(MavenRepository.class);
+ startupContainer.addSingleton(GwtPublisher.class);
+ startupContainer.addSingleton(RegisterMetrics.class);
+ startupContainer.addSingleton(RegisterRules.class);
+ startupContainer.addSingleton(RegisterProvidedProfiles.class);
+ startupContainer.addSingleton(EnableProfiles.class);
+ startupContainer.addSingleton(ActivateDefaultProfiles.class);
+ startupContainer.addSingleton(JdbcDriverDeployer.class);
+ startupContainer.addSingleton(ServerMetadataPersister.class);
+ startupContainer.addSingleton(RegisterQualityModels.class);
+ startupContainer.addSingleton(DeleteDeprecatedMeasures.class);
+ startupContainer.addSingleton(GeneratePluginIndex.class);
+ startupContainer.addSingleton(RegisterNewDashboards.class);
+ startupContainer.addSingleton(IndexProjects.class);
+ startupContainer.startComponents();
- startupContainer.getComponentByType(ServerLifecycleNotifier.class).notifyStart();
+ startupContainer.getComponentByType(ServerLifecycleNotifier.class).notifyStart();
- } finally {
- startupContainer.stopComponents();
- servicesContainer.removeChild();
- servicesContainer.getComponentByType(DatabaseSessionFactory.class).clear();
- }
+ // Do not put the following statements in a finally block.
+ // It would hide the possible exception raised during startup
+ // See SONAR-3107
+ startupContainer.stopComponents();
+ servicesContainer.removeChild();
+ servicesContainer.getComponentByType(DatabaseSessionFactory.class).clear();
}
public void stop() {