]> source.dussan.org Git - sonarqube.git/commit
SONAR-6366 make Java WS available when DB migration is needed
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 14 Apr 2015 14:43:59 +0000 (16:43 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 5 May 2015 07:18:54 +0000 (09:18 +0200)
commitb3b8a174238de179380ff3af762a767063d9ae67
treebecd86a413be1d90d28735a42cc62b612b670246
parent9505d358b35c6304f7076adb8ac3bfcbb2702ee2
SONAR-6366 make Java WS available when DB migration is needed

introduce a new "level" in ServerComponents called safe-mode which is started in place of level3 and 4 when DB needs to be migrated
update ROR code so that Java WS are always started by ROR, even when DB needs an upgrade. In such case, only Java Webservices which supports DB to be in such state are now instanced
in addition, make sure the currentContainer is pointing at all times to a fully initialized container chain (one ending with level4 or safemode), this ensure there is always valid components to support the UI and WS calls
PlatformDatabaseMigration is part of level2 in order to have the same instance share between safe mode container and level3/4 containers therefor avoiding loosing the migration status once the migration is copmplete and the Platform#doStart() is called
refactor Platform code to separate current container switch from start/stop of containers
server/sonar-server/src/main/java/org/sonar/server/platform/Platform.java
server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java
server/sonar-server/src/test/java/org/sonar/server/tester/ServerTester.java
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/java_ws_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/lib/database_version.rb