|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.firebirdsql.pool.SimpleDataSource
public class SimpleDataSource
This is simple implementation of DataSource interface that uses
ConnectionPoolDataSource as connection provider.
| Constructor Summary | |
|---|---|
SimpleDataSource(ConnectionPoolDataSource pool)
Create instance of this class. |
|
| Method Summary | |
|---|---|
Connection |
getConnection()
Get JDBC connection. |
Connection |
getConnection(String username,
String password)
Get JDBC connection for the specified username and password. |
int |
getLoginTimeout()
|
PrintWriter |
getLogWriter()
|
boolean |
isWrapperFor(Class arg0)
|
void |
setLoginTimeout(int seconds)
|
void |
setLogWriter(PrintWriter out)
|
Object |
unwrap(Class arg0)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleDataSource(ConnectionPoolDataSource pool)
pool - instance of ConnectionPoolDataSource that will provide
connections to this data source.| Method Detail |
|---|
public Connection getConnection()
throws SQLException
getConnection in interface DataSourceConnection from this data source.
SQLException - if connection cannot be obtained.
public Connection getConnection(String username,
String password)
throws SQLException
getConnection in interface DataSourceusername - username for new connection.password - password corresponding to the username.
Connection.
SQLException - if connection cannot be obtained.
public PrintWriter getLogWriter()
throws SQLException
getLogWriter in interface CommonDataSourceSQLException
public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLException
public void setLogWriter(PrintWriter out)
throws SQLException
setLogWriter in interface CommonDataSourceSQLException
public void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLException
public boolean isWrapperFor(Class arg0)
throws SQLException
isWrapperFor in interface WrapperSQLException
public Object unwrap(Class arg0)
throws SQLException
unwrap in interface WrapperSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||