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.Connection
getConnection()
java.sql.Connection
getConnection(java.lang.String username, java.lang.String password)
int
getLoginTimeout()
java.io.PrintWriter
getLogWriter()
java.util.logging.Logger
getParentLogger()
java.lang.String
getPassword()
java.lang.String
getUser()
boolean
isWrapperFor(java.lang.Class c)
void
setJdbcUrl(java.lang.String jdbcUrl)
void
setLoginTimeout(int seconds)
void
setLogWriter(java.io.PrintWriter out)
void
setPassword(java.lang.String password)
void
setUser(java.lang.String user)
java.lang.Object
unwrap(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:
getConnection
in 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:
getConnection
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
getLogWriter
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
- Specified by:
getLogWriter
in interfacejavax.sql.CommonDataSource
- Specified by:
getLogWriter
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
setLogWriter
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException
- Specified by:
setLogWriter
in interfacejavax.sql.CommonDataSource
- Specified by:
setLogWriter
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
getLoginTimeout
public int getLoginTimeout() throws java.sql.SQLException
- Specified by:
getLoginTimeout
in interfacejavax.sql.CommonDataSource
- Specified by:
getLoginTimeout
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
setLoginTimeout
public void setLoginTimeout(int seconds) throws java.sql.SQLException
- Specified by:
setLoginTimeout
in interfacejavax.sql.CommonDataSource
- Specified by:
setLoginTimeout
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
setJdbcUrl
public void setJdbcUrl(java.lang.String jdbcUrl)
- Overrides:
setJdbcUrl
in 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:
getParentLogger
in interfacejavax.sql.CommonDataSource
- Throws:
java.sql.SQLFeatureNotSupportedException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class c) throws java.sql.SQLException
- Specified by:
isWrapperFor
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
unwrap
public java.lang.Object unwrap(java.lang.Class c) throws java.sql.SQLException
- Specified by:
unwrap
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
-