public class SimpleDriverDataSource extends java.lang.Object implements DriverDataSource
Modifier and Type | Field and Description |
---|---|
protected static Localizer |
_eloc |
protected static Localizer |
_loc |
Constructor and Description |
---|
SimpleDriverDataSource() |
Modifier and Type | Method and Description |
---|---|
java.util.List<ConnectionDecorator> |
createConnectionDecorators()
Provide any built-in decorators; may be null.
|
java.lang.ClassLoader |
getClassLoader()
Classloader for loading driver class, etc.
|
java.sql.Connection |
getConnection() |
java.sql.Connection |
getConnection(java.util.Properties props) |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password) |
java.lang.String |
getConnectionDriverName()
Driver class name.
|
java.util.Properties |
getConnectionFactoryProperties()
Configuration of datasource properties.
|
protected java.lang.String |
getConnectionPassword() |
java.util.Properties |
getConnectionProperties()
Configuration of connection.
|
java.lang.String |
getConnectionURL()
JDBC URL.
|
java.lang.String |
getConnectionUserName()
JDBC user name.
|
int |
getLoginTimeout() |
java.io.PrintWriter |
getLogWriter() |
java.util.logging.Logger |
getParentLogger() |
protected java.sql.Connection |
getSimpleConnection(java.util.Properties props) |
protected java.sql.Driver |
getSimpleDriver() |
void |
initDBDictionary(DBDictionary dict)
Initialize self and dictionary once available.
|
boolean |
isWrapperFor(java.lang.Class<?> iface) |
void |
setClassLoader(java.lang.ClassLoader classLoader)
JDBC password.
|
void |
setConnectionDriverName(java.lang.String connectionDriverName)
Driver class name.
|
void |
setConnectionFactoryProperties(java.util.Properties props)
Configuration of datasource properties.
|
void |
setConnectionPassword(java.lang.String connectionPassword)
JDBC password.
|
void |
setConnectionProperties(java.util.Properties props)
Configuration of connection.
|
void |
setConnectionURL(java.lang.String connectionURL)
JDBC URL.
|
void |
setConnectionUserName(java.lang.String connectionUserName)
JDBC user name.
|
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(java.io.PrintWriter out) |
java.lang.Object |
unwrap(java.lang.Class iface) |
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.util.Properties props) throws java.sql.SQLException
java.sql.SQLException
protected java.sql.Connection getSimpleConnection(java.util.Properties props) throws java.sql.SQLException
java.sql.SQLException
public int getLoginTimeout()
getLoginTimeout
in interface javax.sql.CommonDataSource
public void setLoginTimeout(int seconds)
setLoginTimeout
in interface javax.sql.CommonDataSource
public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.sql.CommonDataSource
public void setLogWriter(java.io.PrintWriter out)
setLogWriter
in interface javax.sql.CommonDataSource
public void initDBDictionary(DBDictionary dict)
DriverDataSource
initDBDictionary
in interface DriverDataSource
public void setConnectionURL(java.lang.String connectionURL)
DriverDataSource
setConnectionURL
in interface DriverDataSource
public java.lang.String getConnectionURL()
DriverDataSource
getConnectionURL
in interface DriverDataSource
public void setConnectionUserName(java.lang.String connectionUserName)
DriverDataSource
setConnectionUserName
in interface DriverDataSource
public java.lang.String getConnectionUserName()
DriverDataSource
getConnectionUserName
in interface DriverDataSource
public void setConnectionPassword(java.lang.String connectionPassword)
DriverDataSource
setConnectionPassword
in interface DriverDataSource
protected java.lang.String getConnectionPassword()
public void setConnectionProperties(java.util.Properties props)
DriverDataSource
setConnectionProperties
in interface DriverDataSource
public java.util.Properties getConnectionProperties()
DriverDataSource
getConnectionProperties
in interface DriverDataSource
public void setConnectionFactoryProperties(java.util.Properties props)
DriverDataSource
setConnectionFactoryProperties
in interface DriverDataSource
public java.util.Properties getConnectionFactoryProperties()
DriverDataSource
getConnectionFactoryProperties
in interface DriverDataSource
public java.util.List<ConnectionDecorator> createConnectionDecorators()
DriverDataSource
createConnectionDecorators
in interface DriverDataSource
public void setClassLoader(java.lang.ClassLoader classLoader)
DriverDataSource
setClassLoader
in interface DriverDataSource
public java.lang.ClassLoader getClassLoader()
DriverDataSource
getClassLoader
in interface DriverDataSource
public void setConnectionDriverName(java.lang.String connectionDriverName)
DriverDataSource
setConnectionDriverName
in interface DriverDataSource
public java.lang.String getConnectionDriverName()
DriverDataSource
getConnectionDriverName
in interface DriverDataSource
protected java.sql.Driver getSimpleDriver()
public boolean isWrapperFor(java.lang.Class<?> iface)
isWrapperFor
in interface java.sql.Wrapper
public java.lang.Object unwrap(java.lang.Class iface)
unwrap
in interface java.sql.Wrapper
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException
getParentLogger
in interface javax.sql.CommonDataSource
java.sql.SQLFeatureNotSupportedException
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.