aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-10-25 16:20:07 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-10-25 16:20:15 +0200
commit3c07047ac56b549b0d5fe6543db0666c176ec23c (patch)
tree8a6523f91e8054533a81d1bc6676b9baaf52a00c /sonar-server
parent44535b310d471e67ce33b02668f6f09d031d15f1 (diff)
downloadsonarqube-3c07047ac56b549b0d5fe6543db0666c176ec23c.tar.gz
sonarqube-3c07047ac56b549b0d5fe6543db0666c176ec23c.zip
SONAR-2642 first step to integration mybatis
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/java/org/sonar/server/platform/Platform.java12
1 files changed, 7 insertions, 5 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 3c4ae6601ce..1ad12af6cd1 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
@@ -46,9 +46,9 @@ import org.sonar.jpa.dao.DaoFacade;
import org.sonar.jpa.dao.MeasuresDao;
import org.sonar.jpa.dao.ProfilesDao;
import org.sonar.jpa.dao.RulesDao;
-import org.sonar.jpa.session.DatabaseSessionFactory;
-import org.sonar.jpa.session.DatabaseSessionProvider;
-import org.sonar.jpa.session.ThreadLocalDatabaseSessionFactory;
+import org.sonar.jpa.session.*;
+import org.sonar.persistence.DefaultDatabase;
+import org.sonar.persistence.MyBatis;
import org.sonar.server.charts.ChartFactory;
import org.sonar.server.configuration.Backup;
import org.sonar.server.configuration.ProfilesManager;
@@ -121,13 +121,15 @@ public final class Platform {
rootContainer.addSingleton(new BaseConfiguration());
rootContainer.addSingleton(ServerSettings.class);
rootContainer.addSingleton(EmbeddedDatabaseFactory.class);
- rootContainer.addSingleton(JndiDatabaseConnector.class);
+ rootContainer.addSingleton(DefaultDatabase.class);
+ rootContainer.addSingleton(MyBatis.class);
+ rootContainer.addSingleton(DefaultDatabaseConnector.class);
rootContainer.addSingleton(DefaultServerUpgradeStatus.class);
rootContainer.startComponents();
}
private boolean isUpToDateDatabase() {
- JndiDatabaseConnector databaseConnector = getContainer().getComponentByType(JndiDatabaseConnector.class);
+ DefaultDatabaseConnector databaseConnector = getContainer().getComponentByType(DefaultDatabaseConnector.class);
return databaseConnector.isOperational();
}