Example usage for org.apache.ibatis.datasource DataSourceFactory setProperties

List of usage examples for org.apache.ibatis.datasource DataSourceFactory setProperties

Introduction

In this page you can find the example usage for org.apache.ibatis.datasource DataSourceFactory setProperties.

Prototype

void setProperties(Properties props);

Source Link

Usage

From source file:cc.oit.dao.impl.mybatis.session.XMLConfigBuilder.java

License:Apache License

private DataSourceFactory dataSourceElement(XNode context) throws Exception {
    if (context != null) {
        String type = context.getStringAttribute("type");
        Properties props = context.getChildrenAsProperties();
        DataSourceFactory factory = (DataSourceFactory) resolveClass(type).newInstance();
        factory.setProperties(props);
        return factory;
    }//from  www .j a v a  2 s  .co m
    throw new BuilderException("Environment declaration requires a DataSourceFactory.");
}