aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-10-26 18:23:11 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-10-26 18:23:20 +0200
commita589e2539c1d163337daf23b682c95d492b3fbb9 (patch)
tree45435dcee69dd72a3f11a7fc44612b5dc6b60c81 /sonar-batch
parenta6cbc7f7c54c2600c21eed8f361addaa074983b8 (diff)
downloadsonarqube-a589e2539c1d163337daf23b682c95d492b3fbb9.tar.gz
sonarqube-a589e2539c1d163337daf23b682c95d492b3fbb9.zip
SONAR-2642 add DAOs to picocontainer + improve unit tests
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
index f6e60a928ca..a883995f26d 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
@@ -32,6 +32,7 @@ import org.sonar.jpa.session.DefaultDatabaseConnector;
import org.sonar.jpa.session.ThreadLocalDatabaseSessionFactory;
import org.sonar.persistence.DefaultDatabase;
import org.sonar.persistence.MyBatis;
+import org.sonar.persistence.dao.DaoUtils;
import java.net.URLClassLoader;
@@ -68,6 +69,9 @@ public class BootstrapModule extends Module {
addCoreSingleton(MyBatis.class);
addCoreSingleton(DefaultDatabaseConnector.class);
addCoreSingleton(ThreadLocalDatabaseSessionFactory.class);
+ for (Class daoClass : DaoUtils.getDaoClasses()) {
+ addCoreSingleton(daoClass);
+ }
addAdapter(new DatabaseSessionProvider());
for (Object component : boostrapperComponents) {
addCoreSingleton(component);