Package com.mchange.v2.c3p0
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,java.io.Serializable,java.sql.Wrapper,javax.naming.Referenceable,javax.sql.CommonDataSource,javax.sql.DataSource
public final class DriverManagerDataSource extends com.mchange.v2.c3p0.impl.DriverManagerDataSourceBase implements javax.sql.DataSource- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DriverManagerDataSource()DriverManagerDataSource(boolean autoregister)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.ConnectiongetConnection()java.sql.ConnectiongetConnection(java.lang.String username, java.lang.String password)intgetLoginTimeout()java.io.PrintWritergetLogWriter()java.util.logging.LoggergetParentLogger()java.lang.StringgetPassword()java.lang.StringgetUser()booleanisWrapperFor(java.lang.Class c)voidsetJdbcUrl(java.lang.String jdbcUrl)voidsetLoginTimeout(int seconds)voidsetLogWriter(java.io.PrintWriter out)voidsetPassword(java.lang.String password)voidsetUser(java.lang.String user)java.lang.Objectunwrap(java.lang.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
-
-
-
-
Method Detail
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException- Specified by:
getConnectionin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getConnection
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getConnectionin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getLogWriter
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException- Specified by:
getLogWriterin interfacejavax.sql.CommonDataSource- Specified by:
getLogWriterin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
setLogWriter
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException- Specified by:
setLogWriterin interfacejavax.sql.CommonDataSource- Specified by:
setLogWriterin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getLoginTimeout
public int getLoginTimeout() throws java.sql.SQLException- Specified by:
getLoginTimeoutin interfacejavax.sql.CommonDataSource- Specified by:
getLoginTimeoutin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
setLoginTimeout
public void setLoginTimeout(int seconds) throws java.sql.SQLException- Specified by:
setLoginTimeoutin interfacejavax.sql.CommonDataSource- Specified by:
setLoginTimeoutin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
setJdbcUrl
public void setJdbcUrl(java.lang.String jdbcUrl)
- Overrides:
setJdbcUrlin classcom.mchange.v2.c3p0.impl.DriverManagerDataSourceBase
-
setUser
public void setUser(java.lang.String user)
-
getUser
public java.lang.String getUser()
-
setPassword
public void setPassword(java.lang.String password)
-
getPassword
public java.lang.String getPassword()
-
getParentLogger
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException- Specified by:
getParentLoggerin interfacejavax.sql.CommonDataSource- Throws:
java.sql.SQLFeatureNotSupportedException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class c) throws java.sql.SQLException- Specified by:
isWrapperForin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
unwrap
public java.lang.Object unwrap(java.lang.Class c) throws java.sql.SQLException- Specified by:
unwrapin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
-