Class DriverAdapterCPDSProvider
java.lang.Object
org.mybatis.guice.datasource.dbcp.DriverAdapterCPDSProvider
- All Implemented Interfaces:
jakarta.inject.Provider<ConnectionPoolDataSource>
public final class DriverAdapterCPDSProvider
extends Object
implements jakarta.inject.Provider<ConnectionPoolDataSource>
Provides the Apache commons-dbcp
DriverAdapterCPDS
.-
Constructor Summary
ConstructorDescriptionDriverAdapterCPDSProvider
(String driver, String url) Instantiates a new driver adapter CPDS provider. -
Method Summary
Modifier and TypeMethodDescriptionget()
void
setDescription
(String description) Sets the description.void
setLoginTimeout
(int seconds) void
setMaxIdle
(int maxIdle) void
setMaxPreparedStatements
(int maxPreparedStatements) void
setMinEvictableIdleTimeMillis
(int minEvictableIdleTimeMillis) void
setNumTestsPerEvictionRun
(int numTestsPerEvictionRun) void
setPassword
(String password) Sets the password.void
setPoolPreparedStatements
(boolean poolPreparedStatements) void
setTimeBetweenEvictionRunsMillis
(int timeBetweenEvictionRunsMillis) void
Sets the user.
-
Constructor Details
-
Method Details
-
setUser
Sets the user.- Parameters:
username
- the new user- Since:
- 3.3
-
setPassword
Sets the password.- Parameters:
password
- the new password- Since:
- 3.3
-
setDescription
Sets the description.- Parameters:
description
- the new description
-
setLoginTimeout
@Inject(optional=true) public void setLoginTimeout(@Named("JDBC.loginTimeout") int seconds) -
setMaxIdle
@Inject(optional=true) public void setMaxIdle(@Named("DBCP.maxIdle") int maxIdle) -
setMaxPreparedStatements
@Inject(optional=true) public void setMaxPreparedStatements(@Named("DBCP.maxOpenPreparedStatements") int maxPreparedStatements) -
setMinEvictableIdleTimeMillis
@Inject(optional=true) public void setMinEvictableIdleTimeMillis(@Named("DBCP.minEvictableIdleTimeMillis") int minEvictableIdleTimeMillis) -
setNumTestsPerEvictionRun
@Inject(optional=true) public void setNumTestsPerEvictionRun(@Named("DBCP.numTestsPerEvictionRun") int numTestsPerEvictionRun) -
setPoolPreparedStatements
@Inject(optional=true) public void setPoolPreparedStatements(@Named("DBCP.poolPreparedStatements") boolean poolPreparedStatements) -
setTimeBetweenEvictionRunsMillis
@Inject(optional=true) public void setTimeBetweenEvictionRunsMillis(@Named("DBCP.timeBetweenEvictionRunsMillis") int timeBetweenEvictionRunsMillis) -
get
- Specified by:
get
in interfacejakarta.inject.Provider<ConnectionPoolDataSource>
-