From 3c07047ac56b549b0d5fe6543db0666c176ec23c Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 25 Oct 2011 16:20:07 +0200 Subject: SONAR-2642 first step to integration mybatis --- .../src/main/java/org/sonar/server/platform/Platform.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sonar-server') 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(); } -- cgit v1.2.3