public class BasicDataSourceImpl
extends java.lang.Object
implements javax.sql.DataSource
Modifier and Type | Field and Description |
---|---|
protected java.sql.Connection |
connection |
protected java.lang.String |
connectionId |
protected java.util.Properties |
connectionProperties |
protected java.lang.String |
connectionPropertiesDelimiter |
protected java.sql.Driver |
driver |
Constructor and Description |
---|
BasicDataSourceImpl()
BasicDataSourceImpl has no pooling capability and should be used only for testing or stand-along client
|
Modifier and Type | Method and Description |
---|---|
void |
closeConnection() |
java.sql.Connection |
getConnection() |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password) |
java.lang.String |
getConnectionId() |
java.util.Properties |
getConnectionProperties() |
java.lang.String |
getConnectionPropertiesDelimiter() |
java.lang.String |
getConnectionUrl() |
java.lang.String |
getDriverName() |
int |
getLoginTimeout() |
java.io.PrintWriter |
getLogWriter() |
java.util.logging.Logger |
getParentLogger() |
java.lang.String |
getPassword() |
java.lang.String |
getUserName() |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
void |
setConnectionProperties(java.util.Properties connectionProperties) |
void |
setConnectionProperties(java.lang.String connectionProperties) |
void |
setConnectionPropertiesDelimiter(java.lang.String connectionPropertiesDelimiter) |
void |
setConnectionUrl(java.lang.String connectionUrl) |
void |
setDriverName(java.lang.String driverName) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(java.io.PrintWriter out) |
void |
setPassword(java.lang.String password) |
void |
setUserName(java.lang.String userName) |
<T> T |
unwrap(java.lang.Class<T> iface) |
protected transient java.sql.Connection connection
protected java.sql.Driver driver
protected java.util.Properties connectionProperties
protected java.lang.String connectionId
protected java.lang.String connectionPropertiesDelimiter
public BasicDataSourceImpl()
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.io.PrintWriter getLogWriter() throws java.sql.SQLException
getLogWriter
in interface javax.sql.CommonDataSource
java.sql.SQLException
public int getLoginTimeout() throws java.sql.SQLException
getLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException
setLogWriter
in interface javax.sql.CommonDataSource
java.sql.SQLException
public void setLoginTimeout(int seconds) throws java.sql.SQLException
setLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
public java.lang.String getConnectionId()
public java.lang.String getDriverName()
public void setDriverName(java.lang.String driverName)
public java.lang.String getUserName()
public void setUserName(java.lang.String userName)
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public void closeConnection() throws java.sql.SQLException
java.sql.SQLException
public void setConnectionProperties(java.lang.String connectionProperties)
public java.util.Properties getConnectionProperties()
public void setConnectionProperties(java.util.Properties connectionProperties)
public java.lang.String getConnectionPropertiesDelimiter()
public void setConnectionPropertiesDelimiter(java.lang.String connectionPropertiesDelimiter)
public java.lang.String getConnectionUrl()
public void setConnectionUrl(java.lang.String connectionUrl)
public boolean isWrapperFor(java.lang.Class<?> iface)
isWrapperFor
in interface java.sql.Wrapper
public <T> T unwrap(java.lang.Class<T> 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