@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, setLogWriter
public FBDataSource(FBManagedConnectionFactory mcf, XcaConnectionManager cm)
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public void setLoginTimeout(int seconds) throws java.sql.SQLException
setLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
public int getLoginTimeout() throws java.sql.SQLException
getLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
java.sql.SQLException
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
java.sql.SQLException
Copyright © 2001-2024 Jaybird (Firebird JDBC) team. All rights reserved.