@InternalApi public class FBDataSource extends RootCommonDataSource implements javax.sql.DataSource, java.io.Serializable
FBDataSource is a ConnectionFactory for jdbc Connection objects. All work is delegated to a
XcaConnectionManager.
This data source is for internal use inside Jaybird. For a simple data source, use
FBSimpleDataSource, for XA FBXADataSource.
If you need a standalone connection pool, consider using a connection pool implementation like HikariCP, c3p0 or DBCP.
| Constructor and Description |
|---|
FBDataSource(FBManagedConnectionFactory mcf,
XcaConnectionManager cm) |
| Modifier and Type | Method and Description |
|---|---|
java.sql.Connection |
getConnection() |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password) |
int |
getLoginTimeout() |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
void |
setLoginTimeout(int seconds) |
<T> T |
unwrap(java.lang.Class<T> iface) |
getLogWriter, getParentLogger, setLogWriterpublic FBDataSource(FBManagedConnectionFactory mcf, XcaConnectionManager cm)
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic void setLoginTimeout(int seconds)
throws java.sql.SQLException
setLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic int getLoginTimeout()
throws java.sql.SQLException
getLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLExceptionpublic <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLExceptionCopyright © 2001-2023 Jaybird (Firebird JDBC) team. All rights reserved.