Examples of UnpooledDataSourceFactory


Examples of org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory

public class EnumWithOgnlTest {
   
    @Test
    public void testConfiguration() {
        UnpooledDataSourceFactory dataSourceFactory = new UnpooledDataSourceFactory();
        Properties dataSourceProperties = new Properties();
        dataSourceProperties.put("driver", "org.hsqldb.jdbcDriver");
        dataSourceProperties.put("url", "jdbc:hsqldb:mem:xml_references");
        dataSourceProperties.put("username", "sa");
        dataSourceFactory.setProperties(dataSourceProperties);
        Environment environment = new Environment("test", new JdbcTransactionFactory(), dataSourceFactory.getDataSource());
        Configuration configuration = new Configuration();
        configuration.setEnvironment(environment);
        configuration.getTypeAliasRegistry().registerAlias(Person.class);
        configuration.addMapper(PersonMapper.class);
        configuration.addMapper(PersonMapper2.class);
View Full Code Here

Examples of org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory

public class EnumWithOgnlTest {
   
    @Test
    public void testConfiguration() {
        UnpooledDataSourceFactory dataSourceFactory = new UnpooledDataSourceFactory();
        Properties dataSourceProperties = new Properties();
        dataSourceProperties.put("driver", "org.hsqldb.jdbcDriver");
        dataSourceProperties.put("url", "jdbc:hsqldb:mem:xml_references");
        dataSourceProperties.put("username", "sa");
        dataSourceFactory.setProperties(dataSourceProperties);
        Environment environment = new Environment("test", new JdbcTransactionFactory(), dataSourceFactory.getDataSource());
        Configuration configuration = new Configuration();
        configuration.setEnvironment(environment);
        configuration.getTypeAliasRegistry().registerAlias(Person.class);
        configuration.addMapper(PersonMapper.class);
        configuration.addMapper(PersonMapper2.class);
View Full Code Here

Examples of org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory

        configuration.addMapper(TeacherMapper.class);
        configuration.getMappedStatementNames();
    }
   
    private SqlSessionFactory getSqlSessionFactoryWithConstructor() {
        UnpooledDataSourceFactory unpooledDataSourceFactory = new UnpooledDataSourceFactory();
        Properties properties = new Properties();
        properties.setProperty("driver", "org.hsqldb.jdbcDriver");
        properties.setProperty("url", "jdbc:hsqldb:mem:extends_with_constructor");
        properties.setProperty("username", "sa");
        unpooledDataSourceFactory.setProperties(properties);
        Environment environment = new Environment("extends_with_constructor", new JdbcTransactionFactory(), unpooledDataSourceFactory.getDataSource());
       
        Configuration configuration = new Configuration();
        configuration.setEnvironment(environment);
        configuration.addMapper(StudentConstructorMapper.class);
        configuration.addMapper(TeacherMapper.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.