private static final Logger LOG = LoggerFactory.getLogger(AbstractDaoTestCase.class);
private static Database database;
private static DatabaseCommands databaseCommands;
- private MyBatis myBatis;
+ private static MyBatis myBatis;
private IDatabaseTester databaseTester;
database.start();
LOG.info("Test Database: " + database);
databaseCommands = DatabaseCommands.forDialect(database.getDialect());
+
+ myBatis = new MyBatis(database, new Logback(), new NullQueue());
+ myBatis.start();
}
}
public void startDbUnit() throws Exception {
databaseCommands.truncateDatabase(database.getDataSource());
databaseTester = new DataSourceDatabaseTester(database.getDataSource());
- myBatis = new MyBatis(database, new Logback(), new NullQueue());
- myBatis.start();
}
/**