All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bixuebihui.datasource.DbcpDataSource Maven / Gradle / Ivy

Go to download

a fast small database connection pool and a active record flavor mini framework

There is a newer version: 1.15.3.3
Show newest version
package com.bixuebihui.datasource;


import com.bixuebihui.dbcon.DatabaseConfig;
import org.apache.commons.dbcp2.BasicDataSource;


/**
 * 

DbcpDataSource class.

* * @author xingwx * @version $Id: $Id */ public class DbcpDataSource extends BasicDataSource implements INamingPool { private String alias; /** *

Getter for the field alias.

* * @return a {@link java.lang.String} object. */ @Override public String getAlias() { return alias; } /** {@inheritDoc} */ @Override public void setAlias(String alias) { this.alias = alias; } /** {@inheritDoc} */ @Override public void setDatabaseConfig(DatabaseConfig cfg) { this.setAlias(cfg.getAlias()); this.setDriverClassName(cfg.getClassName()); this.setUrl(cfg.getDburl()); this.setUsername(cfg.getUsername()); this.setPassword(cfg.getPassword()); this.setMaxTotal(cfg.getMaxActive()); this.setMaxIdle(cfg.getMaxIdle()); this.setMaxWaitMillis(cfg.getMaxWaitTime()); this.setMaxOpenPreparedStatements(cfg.getMaxOpenPreparedStatements()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy