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