|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.firebirdsql.jdbc.FBDataSource
public class FBDataSource
The class FBDataSource is a ConnectionFactory for jdbc
Connection objects. All work is delegated to a ConnectionManager.
| Constructor Summary | |
|---|---|
FBDataSource(FBManagedConnectionFactory mcf,
javax.resource.spi.ConnectionManager cm)
|
|
FBDataSource(javax.resource.spi.ManagedConnectionFactory mcf,
javax.resource.spi.ConnectionManager cm)
|
|
| Method Summary | |
|---|---|
Connection |
getConnection()
Attempt to establish a database connection. |
Connection |
getConnection(String username,
String password)
Attempt to establish a database connection. |
int |
getLoginTimeout()
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. |
PrintWriter |
getLogWriter()
Get the log writer for this data source. |
Reference |
getReference()
Get the JNDI Reference for this DataSource. |
boolean |
isWrapperFor(Class arg0)
|
void |
setLoginTimeout(int seconds)
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. |
void |
setLogWriter(PrintWriter out)
Set the log writer for this data source. |
void |
setReference(Reference ref)
Set the JNDI Reference for this DataSource. |
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 FBDataSource(javax.resource.spi.ManagedConnectionFactory mcf,
javax.resource.spi.ConnectionManager cm)
public FBDataSource(FBManagedConnectionFactory mcf,
javax.resource.spi.ConnectionManager cm)
| Method Detail |
|---|
public void setReference(Reference ref)
Reference for this DataSource.
ref - The JNDI reference for this DataSourcepublic Reference getReference()
Reference for this DataSource.
getReference in interface Referenceable
public Connection getConnection()
throws SQLException
Attempt to establish a database connection.
getConnection in interface DataSourceSQLException - if a database-access error occurs.
public Connection getConnection(String username,
String password)
throws SQLException
Attempt to establish a database connection.
getConnection in interface DataSourceusername - the database user on whose behalf the Connection is
being madepassword - the user's password
SQLException - if a database-access error occurs.public PrintWriter getLogWriter()
Get the log writer for this data source.
The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.
getLogWriter in interface CommonDataSourcepublic void setLogWriter(PrintWriter out)
Set the log writer for this data source.
The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.
setLogWriter in interface CommonDataSourceout - the new log writer; to disable, set to null
SQLException - if a database-access error occurs.
public void setLoginTimeout(int seconds)
throws SQLException
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise it specifies that there is no timeout. When a DataSource object is created the login timeout is initially zero.
setLoginTimeout in interface CommonDataSourceseconds - the data source login time limit
SQLException - if a database access error occurs.
public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLException - if a database access error occurs.
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 | |||||||||