|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.firebirdsql.ds.RootCommonDataSource
org.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 | ||
|---|---|---|
java.sql.Connection |
getConnection()
Attempt to establish a database connection. |
|
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.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. |
|
javax.naming.Reference |
getReference()
Get the JNDI Reference for this DataSource. |
|
boolean |
isWrapperFor(java.lang.Class<?> iface)
|
|
void |
setLoginTimeout(int seconds)
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. |
|
void |
setReference(javax.naming.Reference ref)
Set the JNDI Reference for this DataSource. |
|
|
unwrap(java.lang.Class<T> iface)
|
|
| Methods inherited from class org.firebirdsql.ds.RootCommonDataSource |
|---|
getLogWriter, getParentLogger, setLogWriter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.sql.CommonDataSource |
|---|
getLogWriter, setLogWriter |
| 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(javax.naming.Reference ref)
Reference for this DataSource.
ref - The JNDI reference for this DataSourcepublic javax.naming.Reference getReference()
Reference for this DataSource.
getReference in interface javax.naming.Referenceable
public java.sql.Connection getConnection()
throws java.sql.SQLException
Attempt to establish a database connection.
getConnection in interface javax.sql.DataSourcejava.sql.SQLException - if a database-access error occurs.
public java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
Attempt to establish a database connection.
getConnection in interface javax.sql.DataSourceusername - the database user on whose behalf the Connection is
being madepassword - the user's password
java.sql.SQLException - if a database-access error occurs.
public void setLoginTimeout(int seconds)
throws java.sql.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 javax.sql.CommonDataSourceseconds - the data source login time limit
java.sql.SQLException - if a database access error occurs.
public int getLoginTimeout()
throws java.sql.SQLException
getLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLException - if a database access error occurs.
public boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLException
public <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||