# Class DriverManagerDataSource

java.lang.Object
com.mchange.v2.c3p0.impl.AbstractIdentityTokenized
com.mchange.v2.c3p0.impl.IdentityTokenResolvable
com.mchange.v2.c3p0.impl.DriverManagerDataSourceBase
com.mchange.v2.c3p0.DriverManagerDataSource

All Implemented Interfaces:
  `com.mchange.v2.c3p0.impl.IdentityTokenized, Serializable, Wrapper, Referenceable, CommonDataSource, DataSource`

public final class DriverManagerDataSource extends com.mchange.v2.c3p0.impl.DriverManagerDataSourceBase implements DataSource

See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class com.mchange.v2.c3p0.impl.DriverManagerDataSourceBase

`description, driverClass, factoryClassLocation, jdbcUrl, pcs, properties`

## Constructor Summary

Constructors
Constructor
Description
`DriverManagerDataSource()`
`DriverManagerDataSource(boolean autoregister)`

## Method Summary

Modifier and Type
Method
Description
`Connection`
`getConnection()`
`Connection`
`getConnection(String username, String password)`
`int`
`getLoginTimeout()`
`PrintWriter`
`getLogWriter()`
`Logger`
`getParentLogger()`
`String`
`getPassword()`
`String`
`getUser()`
`boolean`
`isWrapperFor(Class c)`
`void`
`setJdbcUrl(String jdbcUrl)`
`void`
`setLoginTimeout(int seconds)`
`void`
`setLogWriter(PrintWriter out)`
`void`
`setPassword(String password)`
`void`
`setUser(String user)`
`Object`
`unwrap(Class c)`

### Methods inherited from class com.mchange.v2.c3p0.impl.DriverManagerDataSourceBase

`addPropertyChangeListener, addPropertyChangeListener, extraToStringInfo, getDescription, getDriverClass, getFactoryClassLocation, getIdentityToken, getJdbcUrl, getProperties, getPropertyChangeSupport, getReference, removePropertyChangeListener, removePropertyChangeListener, setDescription, setDriverClass, setFactoryClassLocation, setIdentityToken, setProperties, toString`

### Methods inherited from class com.mchange.v2.c3p0.impl.IdentityTokenResolvable

`doResolve, readResolve, verifyResolve`

### Methods inherited from class com.mchange.v2.c3p0.impl.AbstractIdentityTokenized

`equals, hashCode`

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface CommonDataSource

`createShardingKeyBuilder`

### Methods inherited from interface DataSource

`createConnectionBuilder`

## Constructor Details

### DriverManagerDataSource

public DriverManagerDataSource()

### DriverManagerDataSource

public DriverManagerDataSource(boolean autoregister)

## Method Details

### getConnection

public Connection getConnection() throws SQLException

Specified by:
  `getConnection` in interface `DataSource`
Throws:
  `SQLException`

### getConnection

public Connection getConnection(String username, String password) throws SQLException

Specified by:
  `getConnection` in interface `DataSource`
Throws:
  `SQLException`

### getLogWriter

public PrintWriter getLogWriter() throws SQLException

Specified by:
  `getLogWriter` in interface `CommonDataSource`
Specified by:
  `getLogWriter` in interface `DataSource`
Throws:
  `SQLException`

### setLogWriter

public void setLogWriter(PrintWriter out) throws SQLException

Specified by:
  `setLogWriter` in interface `CommonDataSource`
Specified by:
  `setLogWriter` in interface `DataSource`
Throws:
  `SQLException`

### getLoginTimeout

public int getLoginTimeout() throws SQLException

Specified by:
  `getLoginTimeout` in interface `CommonDataSource`
Specified by:
  `getLoginTimeout` in interface `DataSource`
Throws:
  `SQLException`

### setLoginTimeout

public void setLoginTimeout(int seconds) throws SQLException

Specified by:
  `setLoginTimeout` in interface `CommonDataSource`
Specified by:
  `setLoginTimeout` in interface `DataSource`
Throws:
  `SQLException`

### setJdbcUrl

public void setJdbcUrl(String jdbcUrl)

Overrides:
  `setJdbcUrl` in class `com.mchange.v2.c3p0.impl.DriverManagerDataSourceBase`

### setUser

public void setUser(String user)

### getUser

public String getUser()

### setPassword

public void setPassword(String password)

### getPassword

public String getPassword()

### getParentLogger

public Logger getParentLogger() throws SQLFeatureNotSupportedException

Specified by:
  `getParentLogger` in interface `CommonDataSource`
Throws:
  `SQLFeatureNotSupportedException`

### isWrapperFor

public boolean isWrapperFor(Class c) throws SQLException

Specified by:
  `isWrapperFor` in interface `Wrapper`
Throws:
  `SQLException`

### unwrap

public Object unwrap(Class c) throws SQLException

Specified by:
  `unwrap` in interface `Wrapper`
Throws:
  `SQLException`