com.evermind.sql
Class DriverManagerDataSource
java.lang.Object
com.evermind.sql.DriverManagerDataSource
- All Implemented Interfaces:
- java.io.Serializable, javax.sql.DataSource
public class DriverManagerDataSource
- extends java.lang.Object
- implements javax.sql.DataSource, java.io.Serializable
A DataSource implementation that pulls the connections from the java.sql.DriverManager (pre-datasource way of retrieving connections).
- See Also:
- Serialized Form
|
Field Summary |
static boolean |
DEBUG
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEBUG
public static final boolean DEBUG
DriverManagerDataSource
public DriverManagerDataSource(java.lang.String url)
DriverManagerDataSource
public DriverManagerDataSource()
setURL
public void setURL(java.lang.String url)
setLogin
public void setLogin(java.lang.String username,
java.lang.String password)
getConnection
public java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
- Specified by:
getConnection in interface javax.sql.DataSource
- Throws:
java.sql.SQLException
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Specified by:
getConnection in interface javax.sql.DataSource
- Throws:
java.sql.SQLException
getLogWriter
public java.io.PrintWriter getLogWriter()
- Specified by:
getLogWriter in interface javax.sql.DataSource
setLogWriter
public void setLogWriter(java.io.PrintWriter logWriter)
- Specified by:
setLogWriter in interface javax.sql.DataSource
getLoginTimeout
public int getLoginTimeout()
- Specified by:
getLoginTimeout in interface javax.sql.DataSource
setLoginTimeout
public void setLoginTimeout(int loginTimeout)
- Specified by:
setLoginTimeout in interface javax.sql.DataSource
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
setDriver
public void setDriver(java.sql.Driver driver)
setDefaultAutoCommit
public void setDefaultAutoCommit(boolean autoCommit)
setDataSourceName
public void setDataSourceName(java.lang.String name)
setLocation
public void setLocation(java.lang.String location)
getLocation
public java.lang.String getLocation()
instantiateDataSourceDriver
public void instantiateDataSourceDriver(java.lang.String driverName,
java.lang.ClassLoader dynamicLoader)
throws java.lang.InstantiationException
- Throws:
java.lang.InstantiationException
setRemoteDriver
public void setRemoteDriver(java.lang.String remoteDriver)
setRemoteURL
public void setRemoteURL(java.lang.String remoteURL)