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 Details

    • DriverAdapterCPDSProvider

      @Inject public DriverAdapterCPDSProvider(@Named("JDBC.driver") String driver, @Named("JDBC.url") String url)
      Instantiates a new driver adapter CPDS provider.
      Parameters:
      driver - the driver
      url - the url
  • Method Details

    • setUser

      @Inject(optional=true) public void setUser(@Named("JDBC.username") String username)
      Sets the user.
      Parameters:
      username - the new user
      Since:
      3.3
    • setPassword

      @Inject(optional=true) public void setPassword(@Named("JDBC.password") String password)
      Sets the password.
      Parameters:
      password - the new password
      Since:
      3.3
    • setDescription

      @Inject(optional=true) public void setDescription(@Named("DBCP.description") String description)
      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 interface jakarta.inject.Provider<ConnectionPoolDataSource>