FBWrappingDataSource
will be removed in Jaybird 3; consider migrating to a third party connection pool@Deprecated public class FBWrappingDataSource extends RootCommonDataSource implements javax.sql.DataSource, javax.naming.spi.ObjectFactory, javax.resource.Referenceable, java.io.Serializable, FirebirdPool
DataSource
including connection pooling.
Following properties are supported:
blobBufferSize
size of the buffer used to transfer BLOB data.
blockingTimeout
time in milliseconds during which getConnection()
method will
block if no free connection is in pool.
charSet
similar to encoding
, but takes Java character set name
instead of Firebird's encoding.
database
path to a database including the server name; for example
localhost/3050:c:/path/to/database.gdb
.
encoding
character encoding for the JDBC connection.
freeSize
read-only: gives amount of free connections in the pool, when 0, blocking
will occur if workingSize
is equal to maxPoolSize
.
isolation
default transaction isolation level for connections as string; possible
values are:
loginTimeout
property from DataSource
, in this context is a synonym
for blockingTimeout
(however value is specified in seconds).
maxIdleTime
time in milliseconds after which idle physical connection in the
pool is closed.
maxStatements
maximum number of pooled prepared statements, if 0, pooling is switched
off.
maxPoolSize
maximum number of physical connections that can be opened by this data
source.
minPoolSize
minimum number of connections that will remain open by this data source.
nonStandardProperty
a non-standard connection parameter in form name[=value]
.
password
password that is used to connect to database.
pingInterval
time interval during which connection will be proved for aliveness.
pooling
allows switching pooling off.
statementPooling
alternative way to switch statement pooling off.
socketBufferSize
size of the socket buffer in bytes. In some cases values used by JVM by
default are not optimal. This results in performance degradation
(especially when you transfer big BLOBs). Usually 8192 bytes provides
good results.
roleName
SQL role name.
tpbMapping
mapping of the TPB parameters to JDBC transaction isolation levels.
transactionIsolationLevel
default transaction isolation level, number from Connection
interface.
totalSize
total number of allocated connections.
type
type of connection that will be created. There are four possible types:
pure Java (or type 4), type 2 that will use Firebird client library to
connect to the database, local-mode type 2 driver, and embedded that
will use embedded engine (access to local databases). Possible values
are (case insensitive):
"PURE_JAVA"
or "TYPE4"
for pure Java (type 4) JDBC connections;
"NATIVE"
or "TYPE2"
to use Firebird client library;
"LOCAL"
to use Firebird client library in local-mode (IPC link to server);
"EMBEDDED"
to use embedded engine.
userName
name of the user that will be used to access the database.
workingSize
number of connections that are in use (e.g. were obtained using
getConnection()
method, but not yet closed).
Constructor and Description |
---|
FBWrappingDataSource()
Deprecated.
Create instance of this class.
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize()
Deprecated.
Finalize this instance.
|
int |
getBlobBufferSize()
Deprecated.
|
int |
getBlockingTimeout()
Deprecated.
Get time during which
ConnectionPoolDataSource.getPooledConnection()
can block. |
int |
getBuffersNumber()
Deprecated.
|
java.lang.String |
getCharSet()
Deprecated.
|
java.sql.Connection |
getConnection()
Deprecated.
Get JDBC connection from this data source.
|
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String password)
Deprecated.
Get JDBC connection for the specified user name and password.
|
int |
getConnectionCount()
Deprecated.
Confusing name. Use
getFreeSize() instead. |
int |
getConnectTimeout()
Deprecated.
Get the current connect timeout.
|
java.lang.String |
getDatabase()
Deprecated.
|
DatabaseParameterBuffer |
getDatabaseParameterBuffer()
Deprecated.
Get the database parameter buffer corresponding to the current connection
request information.
|
java.lang.String |
getDefaultIsolation()
Deprecated.
Get the default transaction isolation level as string.
|
javax.naming.Reference |
getDefaultReference()
Deprecated.
Get default JNDI reference for this datasource.
|
int |
getDefaultTransactionIsolation()
Deprecated.
Get the default transaction isolation level.
|
java.lang.String |
getDescription()
Deprecated.
|
java.lang.String |
getEncoding()
Deprecated.
|
int |
getFreeSize()
Deprecated.
|
int |
getIdleTimeout()
Deprecated.
non-standard name, use
getMaxIdleTime() . |
java.lang.String |
getIsolation()
Deprecated.
Use
getDefaultIsolation() instead. |
int |
getLoginTimeout()
Deprecated.
Get login timeout.
|
java.io.PrintWriter |
getLogWriter()
Deprecated.
Get log writer.
|
int |
getMaxConnections()
Deprecated.
non-standard name, use
getMaxPoolSize() . |
int |
getMaxIdleTime()
Deprecated.
Get time after which idle connections will be deallocated.
|
int |
getMaxPoolSize()
Deprecated.
Get maximum number of physical connections that can be simultaneously
open.
|
int |
getMaxStatements()
Deprecated.
|
int |
getMinConnections()
Deprecated.
non-standard name, use
getMinPoolSize() |
int |
getMinPoolSize()
Deprecated.
Get minimum number of open JDBC connections that will be created
when pool is started.
|
java.lang.String |
getNonStandardProperty(java.lang.String key)
Deprecated.
Get the property that does not have corresponding getter method by its
name.
|
java.lang.Object |
getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable environment)
Deprecated.
Get object instance for the specified name in the specified context.
|
java.lang.String |
getPassword()
Deprecated.
|
int |
getPingInterval()
Deprecated.
Get time interval after which connection should be pinged.
|
java.lang.String |
getPingStatement()
Deprecated.
Get SQL statement that will be used to ping connection.
|
boolean |
getPooling()
Deprecated.
use
isPooling() method. |
javax.naming.Reference |
getReference()
Deprecated.
Get JDNI reference.
|
int |
getRetryInterval()
Deprecated.
Get interval of getting connections retries.
|
java.lang.String |
getRoleName()
Deprecated.
|
int |
getSocketBufferSize()
Deprecated.
|
int |
getSoTimeout()
Deprecated.
Get the current Socket blocking timeout (SoTimeout).
|
java.lang.String |
getSqlDialect()
Deprecated.
|
java.lang.String |
getSqlRole()
Deprecated.
please use
getRoleName() instead. |
int |
getTotalSize()
Deprecated.
|
java.lang.String |
getTpbMapping()
Deprecated.
Get the used TPB mapping.
|
int |
getTransactionIsolationLevel()
Deprecated.
Use
getDefaultTransactionIsolation() instead. |
TransactionParameterBuffer |
getTransactionParameters(int isolation)
Deprecated.
Get the transaction parameter buffer corresponding to the current
connection request information.
|
java.lang.String |
getType()
Deprecated.
|
java.lang.String |
getUserName()
Deprecated.
|
java.lang.String |
getUseTranslation()
Deprecated.
|
int |
getWorkingSize()
Deprecated.
|
boolean |
isDefaultResultSetHoldable()
Deprecated.
Get the default ResultSet holdability.
|
boolean |
isKeepStatements()
Deprecated.
|
boolean |
isPingable()
Deprecated.
Check if this pool supports pingable connections.
|
boolean |
isPooling()
Deprecated.
Check if this connection pool uses connection pooling, or just implements
JDBC 2.0 SE interfaces.
|
boolean |
isStatementPooling()
Deprecated.
Check if this connection pool provides also prepared statement pooling.
|
boolean |
isTimestampUsesLocalTimezone()
Deprecated.
|
boolean |
isUseFirebirdAutocommit()
Deprecated.
Get whether to use Firebird autocommit (experimental).
|
boolean |
isUseStandardUdf()
Deprecated.
|
boolean |
isUseStreamBlobs()
Deprecated.
|
boolean |
isWrapperFor(java.lang.Class iface)
Deprecated.
|
void |
restart()
Deprecated.
|
void |
setBlobBufferSize(int bufferSize)
Deprecated.
|
void |
setBlockingTimeout(int blockingTimeoutValue)
Deprecated.
|
void |
setBuffersNumber(int buffersNumber)
Deprecated.
|
void |
setCharSet(java.lang.String charSet)
Deprecated.
|
void |
setConnectTimeout(int connectTimeout)
Deprecated.
Set the connect timeout.
|
void |
setDatabase(java.lang.String database)
Deprecated.
|
void |
setDefaultIsolation(java.lang.String isolation)
Deprecated.
Set the default transaction isolation level as string.
|
void |
setDefaultResultSetHoldable(boolean isHoldable)
Deprecated.
Sets the default ResultSet holdability.
|
void |
setDefaultTransactionIsolation(int defaultIsolationLevel)
Deprecated.
Set the default transaction isolation level.
|
void |
setDescription(java.lang.String descriptionValue)
Deprecated.
|
void |
setEncoding(java.lang.String encoding)
Deprecated.
|
void |
setIdleTimeout(int idleTimeoutValue)
Deprecated.
non-standard name, use
setMaxIdleTime(int) . |
void |
setIsolation(java.lang.String isolation)
Deprecated.
Use
setDefaultIsolation(String) instead. |
void |
setKeepStatements(boolean keepStatements)
Deprecated.
|
void |
setLoginTimeout(int seconds)
Deprecated.
Set login timeout.
|
void |
setLogWriter(java.io.PrintWriter printWriter)
Deprecated.
Set log writer.
|
void |
setMaxConnections(int maxConnections)
Deprecated.
non-standard name, use
setMaxPoolSize(int) . |
void |
setMaxIdleTime(int maxIdleTime)
Deprecated.
|
void |
setMaxPoolSize(int maxPoolSize)
Deprecated.
|
void |
setMaxStatements(int maxStatements)
Deprecated.
|
void |
setMinConnections(int minConnections)
Deprecated.
non-standard name, use
setMinPoolSize(int) |
void |
setMinPoolSize(int minPoolSize)
Deprecated.
|
void |
setNonStandardProperty(java.lang.String propertyMapping)
Deprecated.
Set the property that does not have corresponding setter method.
|
void |
setNonStandardProperty(java.lang.String key,
java.lang.String value)
Deprecated.
Set the property that does not have corresponding setter method.
|
void |
setPassword(java.lang.String password)
Deprecated.
|
void |
setPingInterval(int pingIntervalValue)
Deprecated.
|
void |
setPingStatement(java.lang.String pingStatement)
Deprecated.
|
void |
setPooling(boolean pooling)
Deprecated.
|
void |
setProperties(java.util.Properties props)
Deprecated.
|
void |
setReference(javax.naming.Reference reference)
Deprecated.
Set JNDI reference for this data source.
|
void |
setRetryInterval(int retryInterval)
Deprecated.
|
void |
setRoleName(java.lang.String roleName)
Deprecated.
|
void |
setSocketBufferSize(int socketBufferSize)
Deprecated.
|
void |
setSoTimeout(int soTimeout)
Deprecated.
Set the Socket blocking timeout (SoTimeout).
|
void |
setSqlDialect(java.lang.String sqlDialect)
Deprecated.
|
void |
setSqlRole(java.lang.String sqlRole)
Deprecated.
please use
setRoleName(String) instead. |
void |
setStatementPooling(boolean statementPooling)
Deprecated.
|
void |
setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)
Deprecated.
|
void |
setTpbMapping(java.lang.String tpbMapping)
Deprecated.
Set path to the properties file with the TPB mapping.
|
void |
setTransactionIsolationLevel(int level)
Deprecated.
Use
setDefaultTransactionIsolation(int) instead. |
void |
setTransactionParameters(int isolation,
TransactionParameterBuffer tpb)
Deprecated.
Set transaction parameters for the specified transaction isolation level.
|
void |
setType(java.lang.String type)
Deprecated.
|
void |
setUseFirebirdAutocommit(boolean useFirebirdAutocommit)
Deprecated.
Set whether to use Firebird autocommit (experimental).
|
void |
setUserName(java.lang.String userName)
Deprecated.
|
void |
setUseStandardUdf(boolean useStandardUdf)
Deprecated.
|
void |
setUseStreamBlobs(boolean useStreamBlobs)
Deprecated.
|
void |
setUseTranslation(java.lang.String translationPath)
Deprecated.
|
void |
shutdown()
Deprecated.
|
java.lang.Object |
unwrap(java.lang.Class iface)
Deprecated.
|
getParentLogger
public FBWrappingDataSource()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- if something went wrong.public void restart()
restart
in interface FirebirdPool
public void shutdown()
shutdown
in interface FirebirdPool
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
Connection
.java.sql.SQLException
- if connection cannot be obtained due to some reason.public java.sql.Connection getConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
Connection
java.sql.SQLException
- if something went wrong.public int getLoginTimeout()
getLoginTimeout
in interface javax.sql.CommonDataSource
public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.sql.CommonDataSource
getLogWriter
in class RootCommonDataSource
PrintWriter
.public void setLoginTimeout(int seconds)
setLoginTimeout
in interface javax.sql.CommonDataSource
seconds
- login timeout.public void setLogWriter(java.io.PrintWriter printWriter)
setLogWriter
in interface javax.sql.CommonDataSource
setLogWriter
in class RootCommonDataSource
printWriter
- instance of PrintWriter
.public int getBlockingTimeout()
ConnectionPoolConfiguration
ConnectionPoolDataSource.getPooledConnection()
can block. By default method blocks forever.getBlockingTimeout
in interface ConnectionPoolConfiguration
getBlockingTimeout
in interface FirebirdPool
Integer.MAX_VALUE
indicates blocking forever.public void setBlockingTimeout(int blockingTimeoutValue)
setBlockingTimeout
in interface FirebirdPool
public java.lang.String getDescription()
public void setDescription(java.lang.String descriptionValue)
public int getMaxIdleTime()
ConnectionPoolConfiguration
getMaxIdleTime
in interface ConnectionPoolConfiguration
getMaxIdleTime
in interface FirebirdPool
Integer.MAX_VALUE
indicates that idle connections are not removed.public void setMaxIdleTime(int maxIdleTime)
setMaxIdleTime
in interface FirebirdPool
public int getIdleTimeout()
getMaxIdleTime()
.ConnectionPoolConfiguration
getIdleTimeout
in interface ConnectionPoolConfiguration
Integer.MAX_VALUE
indicates that idle connections are not removed.public void setIdleTimeout(int idleTimeoutValue)
setMaxIdleTime(int)
.public int getMaxStatements()
getMaxStatements
in interface FirebirdPool
public void setMaxStatements(int maxStatements)
setMaxStatements
in interface FirebirdPool
public int getMaxPoolSize()
ConnectionPoolConfiguration
getMaxPoolSize
in interface ConnectionPoolConfiguration
getMaxPoolSize
in interface FirebirdPool
public void setMaxPoolSize(int maxPoolSize)
setMaxPoolSize
in interface FirebirdPool
public int getMaxConnections()
getMaxPoolSize()
.ConnectionPoolConfiguration
getMaxConnections
in interface ConnectionPoolConfiguration
public void setMaxConnections(int maxConnections)
setMaxPoolSize(int)
.public int getMinPoolSize()
ConnectionPoolConfiguration
getMinPoolSize
in interface ConnectionPoolConfiguration
getMinPoolSize
in interface FirebirdPool
public void setMinPoolSize(int minPoolSize)
setMinPoolSize
in interface FirebirdPool
public int getMinConnections()
getMinPoolSize()
ConnectionPoolConfiguration
getMinConnections
in interface ConnectionPoolConfiguration
public void setMinConnections(int minConnections)
setMinPoolSize(int)
public boolean isKeepStatements()
public void setKeepStatements(boolean keepStatements)
public int getPingInterval()
ConnectionPoolConfiguration
getPingInterval
in interface ConnectionPoolConfiguration
getPingInterval
in interface FirebirdPool
public void setPingInterval(int pingIntervalValue)
setPingInterval
in interface FirebirdPool
public java.lang.String getPingStatement()
ConnectionPoolConfiguration
Examples of ping SQL statements:
"SELECT CAST(1 AS INTEGER) FROM DUAL"
"SELECT CAST(1 AS INTEGER) FROM RDB$DATABASE"
getPingStatement
in interface ConnectionPoolConfiguration
public void setPingStatement(java.lang.String pingStatement)
public int getRetryInterval()
ConnectionPoolConfiguration
getRetryInterval
in interface ConnectionPoolConfiguration
public void setRetryInterval(int retryInterval)
public boolean isPingable()
ConnectionPoolConfiguration
isPingable
in interface ConnectionPoolConfiguration
true
if this pool supports pingable connections.public java.lang.String getSqlRole()
getRoleName()
instead.public void setSqlRole(java.lang.String sqlRole)
setRoleName(String)
instead.public boolean getPooling()
isPooling()
method.public boolean isPooling()
ConnectionPoolConfiguration
java.sql.Driver
.isPooling
in interface ConnectionPoolConfiguration
isPooling
in interface FirebirdPool
true
if pooling is enabled.public void setPooling(boolean pooling)
setPooling
in interface FirebirdPool
public boolean isStatementPooling()
ConnectionPoolConfiguration
isStatementPooling
in interface ConnectionPoolConfiguration
isStatementPooling
in interface FirebirdPool
true
if prepared statement pooling is enabled.public void setStatementPooling(boolean statementPooling)
setStatementPooling
in interface FirebirdPool
public int getConnectionCount() throws java.sql.SQLException
getFreeSize()
instead.java.sql.SQLException
public int getFreeSize() throws java.sql.SQLException
getFreeSize
in interface FirebirdPool
java.sql.SQLException
public int getWorkingSize() throws java.sql.SQLException
getWorkingSize
in interface FirebirdPool
java.sql.SQLException
public int getTotalSize() throws java.sql.SQLException
getTotalSize
in interface FirebirdPool
java.sql.SQLException
public int getTransactionIsolationLevel()
getDefaultTransactionIsolation()
instead.public void setTransactionIsolationLevel(int level)
setDefaultTransactionIsolation(int)
instead.public java.lang.String getIsolation()
getDefaultIsolation()
instead.public void setIsolation(java.lang.String isolation) throws java.sql.SQLException
setDefaultIsolation(String)
instead.java.sql.SQLException
public void setProperties(java.util.Properties props)
public int getBlobBufferSize()
getBlobBufferSize
in interface FirebirdConnectionProperties
public int getBuffersNumber()
getBuffersNumber
in interface FirebirdConnectionProperties
public java.lang.String getCharSet()
getCharSet
in interface FirebirdConnectionProperties
FirebirdConnectionProperties.setCharSet(String)
public java.lang.String getDatabase()
getDatabase
in interface FirebirdConnectionProperties
public DatabaseParameterBuffer getDatabaseParameterBuffer() throws java.sql.SQLException
FirebirdConnectionProperties
getDatabaseParameterBuffer
in interface FirebirdConnectionProperties
DatabaseParameterBuffer
.java.sql.SQLException
- if database parameter buffer cannot be created.public java.lang.String getDefaultIsolation()
FirebirdConnectionProperties
FirebirdConnectionProperties.getDefaultTransactionIsolation()
, however
it takes a string as parameter instead of a numeric constant.getDefaultIsolation
in interface FirebirdConnectionProperties
FirebirdConnectionProperties.setDefaultIsolation(String)
public int getDefaultTransactionIsolation()
FirebirdConnectionProperties
getDefaultTransactionIsolation
in interface FirebirdConnectionProperties
public java.lang.String getEncoding()
getEncoding
in interface FirebirdConnectionProperties
FirebirdConnectionProperties.setEncoding(String)
public java.lang.String getNonStandardProperty(java.lang.String key)
FirebirdConnectionProperties
getNonStandardProperty
in interface FirebirdConnectionProperties
key
- name of the property to get.public java.lang.String getPassword()
getPassword
in interface FirebirdConnectionProperties
public java.lang.String getRoleName()
getRoleName
in interface FirebirdConnectionProperties
public int getSocketBufferSize()
getSocketBufferSize
in interface FirebirdConnectionProperties
public java.lang.String getSqlDialect()
getSqlDialect
in interface FirebirdConnectionProperties
public java.lang.String getTpbMapping()
FirebirdConnectionProperties
getTpbMapping
in interface FirebirdConnectionProperties
FirebirdConnectionProperties.setTpbMapping(String)
public TransactionParameterBuffer getTransactionParameters(int isolation)
FirebirdConnectionProperties
getTransactionParameters
in interface FirebirdConnectionProperties
isolation
- transaction isolation level for which TPB should be returned.TransactionParameterBuffer
.public java.lang.String getType()
getType
in interface FirebirdConnectionProperties
public java.lang.String getUserName()
getUserName
in interface FirebirdConnectionProperties
public java.lang.String getUseTranslation()
getUseTranslation
in interface FirebirdConnectionProperties
public boolean isTimestampUsesLocalTimezone()
isTimestampUsesLocalTimezone
in interface FirebirdConnectionProperties
true
if the Jaybird 1.0 handling of the calendar
in corresponding setters. This is also compatible with MySQL
calendar treatment.public boolean isUseStandardUdf()
isUseStandardUdf
in interface FirebirdConnectionProperties
true
if driver should assume that standard UDF are
installed.public boolean isUseStreamBlobs()
isUseStreamBlobs
in interface FirebirdConnectionProperties
true
if stream blobs should be created, otherwise
false
.public void setBlobBufferSize(int bufferSize)
setBlobBufferSize
in interface FirebirdConnectionProperties
bufferSize
- size of the BLOB buffer in bytes.public void setBuffersNumber(int buffersNumber)
setBuffersNumber
in interface FirebirdConnectionProperties
buffersNumber
- number of cache buffers that should be allocated for this
connection, should be specified for ClassicServer instances,
SuperServer has a server-wide configuration parameter.public void setCharSet(java.lang.String charSet)
setCharSet
in interface FirebirdConnectionProperties
charSet
- Character set for the connection. Similar to
encoding
property, but accepts Java names
instead of Firebird ones.public void setDatabase(java.lang.String database)
setDatabase
in interface FirebirdConnectionProperties
database
- path to the database including the server name and the
port, if needed.public void setDefaultIsolation(java.lang.String isolation)
FirebirdConnectionProperties
FirebirdConnectionProperties.setDefaultTransactionIsolation(int)
,
however it takes a string as parameter instead of a numeric constant.
Following strings are allowed:
"TRANSACTION_READ_COMMITTED"
for a READ COMMITTED
isolation level.
"TRANSACTION_REPEATABLE_READ"
for a REPEATABLE READ
isolation level.
"TRANSACTION_SERIALIZABLE"
for a SERIALIZABLE
isolation level.
setDefaultIsolation
in interface FirebirdConnectionProperties
isolation
- string constant representing a default isolation level.public void setDefaultTransactionIsolation(int defaultIsolationLevel)
FirebirdConnectionProperties
setDefaultTransactionIsolation
in interface FirebirdConnectionProperties
defaultIsolationLevel
- default transaction isolation level.public void setEncoding(java.lang.String encoding)
setEncoding
in interface FirebirdConnectionProperties
encoding
- Character encoding for the connection. See Firebird
documentation for more information.public void setNonStandardProperty(java.lang.String key, java.lang.String value)
FirebirdConnectionProperties
setNonStandardProperty
in interface FirebirdConnectionProperties
key
- name of the property to set.value
- value of the property.public void setNonStandardProperty(java.lang.String propertyMapping)
FirebirdConnectionProperties
setNonStandardProperty
in interface FirebirdConnectionProperties
propertyMapping
- parameter value in the ?propertyName[=propertyValue]? form,
this allows setting non-standard parameters using
configuration files.public void setPassword(java.lang.String password)
setPassword
in interface FirebirdConnectionProperties
password
- password corresponding to the specified user name.public void setRoleName(java.lang.String roleName)
setRoleName
in interface FirebirdConnectionProperties
roleName
- SQL role to use.public void setSocketBufferSize(int socketBufferSize)
setSocketBufferSize
in interface FirebirdConnectionProperties
socketBufferSize
- socket buffer size in bytes.public void setSqlDialect(java.lang.String sqlDialect)
setSqlDialect
in interface FirebirdConnectionProperties
sqlDialect
- SQL dialect of the client.public void setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)
setTimestampUsesLocalTimezone
in interface FirebirdConnectionProperties
timestampUsesLocalTimezone
- true
if the Jaybird 1.0 handling of the
calendar in corresponding setters. This is also compatible
with MySQL calendar treatment.public void setTpbMapping(java.lang.String tpbMapping)
FirebirdConnectionProperties
"res:"
should be used to specify resource
in the classpath.
For the compatibility reasons, if no protocol is specified, classpath is used by default.
Properties file contains a mapping between the transaction isolation
level (name of the constant in the Connection
interface
and a comma-separated list of TPB parameters.
setTpbMapping
in interface FirebirdConnectionProperties
tpbMapping
- path to the properties file.public void setTransactionParameters(int isolation, TransactionParameterBuffer tpb)
FirebirdConnectionProperties
setTransactionParameters
in interface FirebirdConnectionProperties
isolation
- transaction isolation level.tpb
- instance of TransactionParameterBuffer
containing
transaction parameters.public void setType(java.lang.String type)
setType
in interface FirebirdConnectionProperties
type
- type of the connection, for example, "PURE_JAVA", "LOCAL",
"EMBEDDED", depends on the GDS implementations installed in the system.public void setUserName(java.lang.String userName)
setUserName
in interface FirebirdConnectionProperties
userName
- name of the user that will be used when connecting to the
database.public void setUseStandardUdf(boolean useStandardUdf)
setUseStandardUdf
in interface FirebirdConnectionProperties
useStandardUdf
- true
if driver should assume that standard UDF
are installed.public void setUseStreamBlobs(boolean useStreamBlobs)
setUseStreamBlobs
in interface FirebirdConnectionProperties
useStreamBlobs
- true
if stream blobs should be created,
otherwise false
.public void setUseTranslation(java.lang.String translationPath)
setUseTranslation
in interface FirebirdConnectionProperties
translationPath
- path to the character translation table.public boolean isDefaultResultSetHoldable()
FirebirdConnectionProperties
isDefaultResultSetHoldable
in interface FirebirdConnectionProperties
true
when ResultSets are holdable by default, false
not holdable.public void setDefaultResultSetHoldable(boolean isHoldable)
FirebirdConnectionProperties
setDefaultResultSetHoldable
in interface FirebirdConnectionProperties
isHoldable
- true
when ResultSets are holdable by default, false
not holdable.public int getSoTimeout()
FirebirdConnectionProperties
getSoTimeout
in interface FirebirdConnectionProperties
public void setSoTimeout(int soTimeout)
FirebirdConnectionProperties
setSoTimeout
in interface FirebirdConnectionProperties
soTimeout
- Timeout in milliseconds (0 is 'infinite')public int getConnectTimeout()
FirebirdConnectionProperties
getConnectTimeout
in interface FirebirdConnectionProperties
public void setConnectTimeout(int connectTimeout)
FirebirdConnectionProperties
setConnectTimeout
in interface FirebirdConnectionProperties
connectTimeout
- Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)public boolean isUseFirebirdAutocommit()
FirebirdConnectionProperties
isUseFirebirdAutocommit
in interface FirebirdConnectionProperties
public void setUseFirebirdAutocommit(boolean useFirebirdAutocommit)
FirebirdConnectionProperties
setUseFirebirdAutocommit
in interface FirebirdConnectionProperties
useFirebirdAutocommit
- true
Use Firebird autocommitpublic java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment) throws java.lang.Exception
obj
represents
Reference
, whose factory class is equal to this class.getObjectInstance
in interface javax.naming.spi.ObjectFactory
java.lang.Exception
public javax.naming.Reference getReference()
getReference
in interface javax.naming.Referenceable
Reference
.public void setReference(javax.naming.Reference reference)
reference
- JNDI reference.public javax.naming.Reference getDefaultReference()
Reference
containing all information
that allows to reconstruct the datasource.public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
java.sql.SQLException
public java.lang.Object unwrap(java.lang.Class iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
java.sql.SQLException
Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.