Package org.fugerit.java.core.db.connect
Class DbcpConnectionFactory
- java.lang.Object
-
- org.fugerit.java.core.log.BasicLogObject
-
- org.fugerit.java.core.db.connect.ConnectionFactoryImpl
-
- org.fugerit.java.core.db.connect.DbcpConnectionFactory
-
- All Implemented Interfaces:
ConnectionFactory
,LogObject
public class DbcpConnectionFactory extends ConnectionFactoryImpl
ConnectionFactory implementation based on a DBCP 1.4- Author:
- Fugerit
-
-
Field Summary
-
Fields inherited from class org.fugerit.java.core.db.connect.ConnectionFactoryImpl
PROP_CF_EXT_POOLED, PROP_CF_EXT_POOLED_IC, PROP_CF_EXT_POOLED_MC, PROP_CF_EXT_POOLED_SC, PROP_CF_MODE, PROP_CF_MODE_DC, PROP_CF_MODE_DC_DRV, PROP_CF_MODE_DC_PREFIX, PROP_CF_MODE_DC_PWD, PROP_CF_MODE_DC_URL, PROP_CF_MODE_DC_USR, PROP_CF_MODE_DS, PROP_CF_MODE_DS_NAME, PROP_CF_MODE_DS2
-
-
Constructor Summary
Constructors Constructor Description DbcpConnectionFactory(String drv, String url, String usr, String pwd, int init, int min, int max)
ConstructorDbcpConnectionFactory(String drv, String url, String usr, String pwd, int init, int min, int max, ClassLoader cl)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Connection
getConnection()
Return a connection from the factory-
Methods inherited from class org.fugerit.java.core.db.connect.ConnectionFactoryImpl
getDataBaseInfo, getDriverInfo, init, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, parseCfConfig, release, wrap
-
Methods inherited from class org.fugerit.java.core.log.BasicLogObject
getLogger
-
-
-
-
Constructor Detail
-
DbcpConnectionFactory
public DbcpConnectionFactory(String drv, String url, String usr, String pwd, int init, int min, int max) throws DAOException
Constructor- Parameters:
drv
- driver typeurl
- jdbc urlusr
- userpwd
- passwordinit
- initial connectionmin
- minimum connectionmax
- maximum connection- Throws:
DAOException
- in case of issues
-
DbcpConnectionFactory
public DbcpConnectionFactory(String drv, String url, String usr, String pwd, int init, int min, int max, ClassLoader cl) throws DAOException
Constructor- Parameters:
drv
- driver typeurl
- jdbc urlusr
- userpwd
- passwordinit
- initial connectionmin
- minimum connectionmax
- maximum connectioncl
- the class loader- Throws:
DAOException
- in case of issues
-
-
Method Detail
-
getConnection
public Connection getConnection() throws DAOException
Description copied from interface:ConnectionFactory
Return a connection from the factory- Specified by:
getConnection
in interfaceConnectionFactory
- Specified by:
getConnection
in classConnectionFactoryImpl
- Returns:
- the java.sql.Connection
- Throws:
DAOException
- in case of issues
-
-