use of org.apache.ibatis.datasource.unpooled.UnpooledDataSource in project mybatis-3 by mybatis.
the class MultipleReverseIncludeTest method getSqlSessionFactoryJavaConfig.
private SqlSessionFactory getSqlSessionFactoryJavaConfig() throws Exception {
Class.forName("org.hsqldb.jdbcDriver");
Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:xmlextref", "sa", "");
initDb(c);
Configuration configuration = new Configuration();
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
configuration.setEnvironment(environment);
configuration.addMapper(MultipleReverseIncludePersonMapper.class);
return new SqlSessionFactoryBuilder().build(configuration);
}
use of org.apache.ibatis.datasource.unpooled.UnpooledDataSource in project mybatis-3 by mybatis.
the class ParameterMapReferenceTest method getSqlSessionFactoryJavaConfig.
private SqlSessionFactory getSqlSessionFactoryJavaConfig() throws Exception {
Class.forName("org.hsqldb.jdbcDriver");
Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:xmlextref", "sa", "");
initDb(c);
Configuration configuration = new Configuration();
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
configuration.setEnvironment(environment);
configuration.addMapper(ParameterMapReferencePersonMapper.class);
configuration.addMapper(ParameterMapReferencePetMapper.class);
return new SqlSessionFactoryBuilder().build(configuration);
}
use of org.apache.ibatis.datasource.unpooled.UnpooledDataSource in project mybatis-3 by mybatis.
the class ResultMapExtendsTest method getSqlSessionFactoryJavaConfig.
private SqlSessionFactory getSqlSessionFactoryJavaConfig() throws Exception {
Class.forName("org.hsqldb.jdbcDriver");
Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:xmlextref", "sa", "");
initDb(c);
Configuration configuration = new Configuration();
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
configuration.setEnvironment(environment);
configuration.addMapper(ResultMapReferencePersonMapper.class);
configuration.addMapper(ResultMapReferencePetMapper.class);
return new SqlSessionFactoryBuilder().build(configuration);
}
use of org.apache.ibatis.datasource.unpooled.UnpooledDataSource in project mybatis-3 by mybatis.
the class MultipleCrossIncludeTest method getSqlSessionFactoryJavaConfig.
private SqlSessionFactory getSqlSessionFactoryJavaConfig() throws Exception {
Class.forName("org.hsqldb.jdbcDriver");
Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:xmlextref", "sa", "");
initDb(c);
Configuration configuration = new Configuration();
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
configuration.setEnvironment(environment);
configuration.addMapper(MultipleCrossIncludePersonMapper.class);
configuration.addMapper(MultipleCrossIncludePetMapper.class);
return new SqlSessionFactoryBuilder().build(configuration);
}
use of org.apache.ibatis.datasource.unpooled.UnpooledDataSource in project mybatis-3 by mybatis.
the class MultipleIncludeTest method getSqlSessionFactoryJavaConfig.
private SqlSessionFactory getSqlSessionFactoryJavaConfig() throws Exception {
Class.forName("org.hsqldb.jdbcDriver");
Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:xmlextref", "sa", "");
initDb(c);
Configuration configuration = new Configuration();
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
configuration.setEnvironment(environment);
configuration.addMapper(MultipleIncludePersonMapper.class);
return new SqlSessionFactoryBuilder().build(configuration);
}
Aggregations