use of org.picocontainer.containers.TransientPicoContainer in project sonarqube by SonarSource.
the class DbTester method initDbClient.
private void initDbClient() {
TransientPicoContainer ioc = new TransientPicoContainer();
ioc.addComponent(db.getMyBatis());
ioc.addComponent(system2);
ioc.addComponent(new SequenceUuidFactory());
for (Class daoClass : DaoModule.classes()) {
ioc.addComponent(daoClass);
}
List<Dao> daos = ioc.getComponents(Dao.class);
client = new DbClient(db.getDatabase(), db.getMyBatis(), daos.toArray(new Dao[daos.size()]));
}
Aggregations