Class FBManagedConnectionFactory
- All Implemented Interfaces:
Serializable,javax.resource.spi.ManagedConnectionFactory,FirebirdConnectionProperties
- Author:
- David Jencks , Mark Rotteveel
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new pure-Java FBManagedConnectionFactory.FBManagedConnectionFactory(GDSType gdsType) Create a new FBManagedConnectionFactory based around the given GDSType.FBManagedConnectionFactory(GDSType gdsType, FBConnectionProperties connectionProperties) -
Method Summary
Modifier and TypeMethodDescriptionThecanonicalizemethod is used in FBDriver to reuse previous fbmcf instances if they have been create.ThecreateConnectionFactorymethod creates a DataSource with a default stand alone ConnectionManager.createConnectionFactory(javax.resource.spi.ConnectionManager cxManager) ThecreateConnectionFactorymethod creates a DataSource using the supplied ConnectionManager.javax.resource.spi.ManagedConnectioncreateManagedConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cri) Creates a new physical connection to the underlying EIS resource manager, ManagedConnectionFactory uses the security information (passed as Subject) and additional ConnectionRequestInfo (which is specific to ResourceAdapter and opaque to application server) to create this new connection.booleanvoidforget(FBManagedConnection mc, Xid xid) Get the list of authentication plugins to try.intDeprecated.intintfinal FBConnectionPropertiesintGet the current connect timeout.Get the database parameter buffer corresponding to the current connection request information.Get thedataTypeBindconfiguration.Get the database encryption plugin configuration.Get the default transaction isolation level as string.intGet the default transaction isolation level.Get the GDS implementation type around which this factory is based.Get thegeneratedKeysEnabledconfiguration.Deprecated.usegetCharSet()instead.Get the log writer for thisManagedConnectionFactoryinstance.Get the property that does not have corresponding getter method by its name.Get thesessionTimeZone.intintGet the current Socket blocking timeout (SoTimeout).getTpb(int defaultTransactionIsolation) Get the used TPB mapping.Deprecated.Deprecated.getTransactionParameters(int isolation) Get the transaction parameter buffer corresponding to the current connection request information.getType()Get the wire encryption level value.inthashCode()booleanGet the default ResultSet holdability.booleanGet the value forignoreProcedureType.booleanbooleanGet whether to use Firebird autocommit (experimental).booleanbooleanbooleanGet if wire compression should be enabled.javax.resource.spi.ManagedConnectionmatchManagedConnections(Set connectionSet, Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo) Returns a matched connection from the candidate set of connections.voidrecover(FBManagedConnection mc, Xid xid) voidsetAuthPlugins(String authPlugins) Sets the authentication plugins to try.voidsetBlobBufferLength(int value) Deprecated.voidsetBlobBufferSize(int bufferSize) voidsetBuffersNumber(int buffersNumber) voidsetCharSet(String charSet) voidsetConnectTimeout(int connectTimeout) Set the connect timeout.voidsetDatabase(String database) voidsetDataTypeBind(String dataTypeBind) Sets thedataTypeBindconfiguration.voidsetDbCryptConfig(String dbCryptConfig) Sets the database encryption plugin configuration.voidsetDefaultConnectionManager(javax.resource.spi.ConnectionManager defaultCm) voidsetDefaultIsolation(String isolation) Set the default transaction isolation level as string.voidsetDefaultResultSetHoldable(boolean isHoldable) Sets the default ResultSet holdability.voidsetDefaultTransactionIsolation(int defaultIsolationLevel) Set the default transaction isolation level.voidsetEncoding(String encoding) voidsetGeneratedKeysEnabled(String generatedKeysEnabled) Sets thegeneratedKeysEnabledconfiguration.voidsetIgnoreProcedureType(boolean ignoreProcedureType) Sets the valueignoreProcedureType.voidsetLocalEncoding(String localEncoding) Deprecated.usesetCharSet(String)instead.voidsetLogWriter(PrintWriter out) Set the log writer for thisManagedConnectionFactoryinstance.voidsetNonStandardProperty(String propertyMapping) Set the property that does not have corresponding setter method.voidsetNonStandardProperty(String key, String value) Set the property that does not have corresponding setter method.voidsetPassword(String password) voidsetRoleName(String roleName) voidsetSessionTimeZone(String sessionTimeZone) Sets thesessionTimeZone.voidsetSocketBufferSize(int socketBufferSize) voidsetSoTimeout(int soTimeout) Set the Socket blocking timeout (SoTimeout).voidsetSqlDialect(String sqlDialect) voidsetTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone) voidsetTpbMapping(String tpbMapping) Set path to the properties file with the TPB mapping.voidsetTransactionIsolation(Integer value) Deprecated.voidDeprecated.voidsetTransactionParameters(int isolation, TransactionParameterBuffer tpb) Set transaction parameters for the specified transaction isolation level.voidvoidsetUseFirebirdAutocommit(boolean useFirebirdAutocommit) Set whether to use Firebird autocommit (experimental).voidsetUserName(String userName) voidsetUseStandardUdf(boolean useStandardUdf) voidsetUseStreamBlobs(boolean useStreamBlobs) voidsetWireCompression(boolean wireCompression) Sets if the connection should try to enable wire compression.voidsetWireCrypt(String wireCrypt) Sets the wire encryption level.
-
Constructor Details
-
FBManagedConnectionFactory
public FBManagedConnectionFactory()Create a new pure-Java FBManagedConnectionFactory. -
FBManagedConnectionFactory
Create a new FBManagedConnectionFactory based around the given GDSType.- Parameters:
gdsType- The GDS implementation to use
-
FBManagedConnectionFactory
-
-
Method Details
-
getDatabaseFactory
-
getGDSType
Get the GDS implementation type around which this factory is based.- Returns:
- The GDS implementation type
-
getBlobBufferLength
Deprecated. -
setBlobBufferLength
Deprecated. -
getTransactionIsolation
Deprecated. -
setTransactionIsolation
Deprecated. -
getTransactionIsolationName
Deprecated. -
setTransactionIsolationName
Deprecated. -
getLocalEncoding
Deprecated.usegetCharSet()instead. -
setLocalEncoding
Deprecated.usesetCharSet(String)instead. -
getBlobBufferSize
public int getBlobBufferSize()- Specified by:
getBlobBufferSizein interfaceFirebirdConnectionProperties- Returns:
- BLOB buffer size in bytes.
-
getBuffersNumber
public int getBuffersNumber()- Specified by:
getBuffersNumberin interfaceFirebirdConnectionProperties- Returns:
- number of cache buffers that should be allocated for this connection, should be specified for ClassicServer instances, SuperServer has a server-wide configuration parameter.
-
getCharSet
- Specified by:
getCharSetin interfaceFirebirdConnectionProperties- Returns:
- Character set for the connection.
- See Also:
-
getDatabase
- Specified by:
getDatabasein interfaceFirebirdConnectionProperties- Returns:
- path to the database including the server name and the port, if needed.
-
getDatabaseParameterBuffer
Description copied from interface:FirebirdConnectionPropertiesGet the database parameter buffer corresponding to the current connection request information.- Specified by:
getDatabaseParameterBufferin interfaceFirebirdConnectionProperties- Returns:
- instance of
DatabaseParameterBuffer. - Throws:
SQLException- if database parameter buffer cannot be created.
-
getDefaultIsolation
Description copied from interface:FirebirdConnectionPropertiesGet the default transaction isolation level as string. This method is complementary to theFirebirdConnectionProperties.getDefaultTransactionIsolation(), however it takes a string as parameter instead of a numeric constant.- Specified by:
getDefaultIsolationin interfaceFirebirdConnectionProperties- Returns:
- default transaction isolation as string.
- See Also:
-
getDefaultTransactionIsolation
public int getDefaultTransactionIsolation()Description copied from interface:FirebirdConnectionPropertiesGet the default transaction isolation level. This is the transaction isolation level for the newly created connections.- Specified by:
getDefaultTransactionIsolationin interfaceFirebirdConnectionProperties- Returns:
- default transaction isolation level.
-
getEncoding
- Specified by:
getEncodingin interfaceFirebirdConnectionProperties- Returns:
- Character encoding for the connection.
- See Also:
-
getNonStandardProperty
Description copied from interface:FirebirdConnectionPropertiesGet the property that does not have corresponding getter method by its name.- Specified by:
getNonStandardPropertyin interfaceFirebirdConnectionProperties- Parameters:
key- name of the property to get.- Returns:
- value of the property.
-
getPassword
- Specified by:
getPasswordin interfaceFirebirdConnectionProperties- Returns:
- password corresponding to the specified user name.
-
getRoleName
- Specified by:
getRoleNamein interfaceFirebirdConnectionProperties- Returns:
- SQL role to use.
-
getSocketBufferSize
public int getSocketBufferSize()- Specified by:
getSocketBufferSizein interfaceFirebirdConnectionProperties- Returns:
- socket buffer size in bytes, or -1 is not specified.
-
getSqlDialect
- Specified by:
getSqlDialectin interfaceFirebirdConnectionProperties- Returns:
- SQL dialect of the client.
-
getTpbMapping
Description copied from interface:FirebirdConnectionPropertiesGet the used TPB mapping.- Specified by:
getTpbMappingin interfaceFirebirdConnectionProperties- Returns:
- path to the TPB mapping.
- See Also:
-
getTransactionParameters
Description copied from interface:FirebirdConnectionPropertiesGet the transaction parameter buffer corresponding to the current connection request information.- Specified by:
getTransactionParametersin interfaceFirebirdConnectionProperties- Parameters:
isolation- transaction isolation level for which TPB should be returned.- Returns:
- instance of
TransactionParameterBuffer.
-
getType
- Specified by:
getTypein interfaceFirebirdConnectionProperties- Returns:
- type of the connection, for example, "PURE_JAVA", "LOCAL", "EMBEDDED", depends on the GDS implementations installed in the system.
-
getUserName
- Specified by:
getUserNamein interfaceFirebirdConnectionProperties- Returns:
- name of the user that will be used when connecting to the database.
-
isTimestampUsesLocalTimezone
public boolean isTimestampUsesLocalTimezone()- Specified by:
isTimestampUsesLocalTimezonein interfaceFirebirdConnectionProperties- Returns:
trueif the Jaybird 1.0 handling of the calendar in corresponding setters. This is also compatible with MySQL calendar treatment.
-
isUseStandardUdf
public boolean isUseStandardUdf()- Specified by:
isUseStandardUdfin interfaceFirebirdConnectionProperties- Returns:
trueif driver should assume that standard UDF are installed.
-
isUseStreamBlobs
public boolean isUseStreamBlobs()- Specified by:
isUseStreamBlobsin interfaceFirebirdConnectionProperties- Returns:
trueif stream blobs should be created, otherwisefalse.
-
setBlobBufferSize
public void setBlobBufferSize(int bufferSize) - Specified by:
setBlobBufferSizein interfaceFirebirdConnectionProperties- Parameters:
bufferSize- size of the BLOB buffer in bytes.
-
setBuffersNumber
public void setBuffersNumber(int buffersNumber) - Specified by:
setBuffersNumberin interfaceFirebirdConnectionProperties- Parameters:
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.
-
setCharSet
- Specified by:
setCharSetin interfaceFirebirdConnectionProperties- Parameters:
charSet- Character set for the connection. Similar toencodingproperty, but accepts Java names instead of Firebird ones.
-
setDatabase
- Specified by:
setDatabasein interfaceFirebirdConnectionProperties- Parameters:
database- path to the database including the server name and the port, if needed.
-
setDefaultIsolation
Description copied from interface:FirebirdConnectionPropertiesSet the default transaction isolation level as string. This method is complementary to theFirebirdConnectionProperties.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.
- Specified by:
setDefaultIsolationin interfaceFirebirdConnectionProperties- Parameters:
isolation- string constant representing a default isolation level.
-
setDefaultTransactionIsolation
public void setDefaultTransactionIsolation(int defaultIsolationLevel) Description copied from interface:FirebirdConnectionPropertiesSet the default transaction isolation level.- Specified by:
setDefaultTransactionIsolationin interfaceFirebirdConnectionProperties- Parameters:
defaultIsolationLevel- default transaction isolation level.
-
setEncoding
- Specified by:
setEncodingin interfaceFirebirdConnectionProperties- Parameters:
encoding- Character encoding for the connection. See Firebird documentation for more information.
-
setNonStandardProperty
Description copied from interface:FirebirdConnectionPropertiesSet the property that does not have corresponding setter method.- Specified by:
setNonStandardPropertyin interfaceFirebirdConnectionProperties- Parameters:
key- name of the property to set.value- value of the property.
-
setNonStandardProperty
Description copied from interface:FirebirdConnectionPropertiesSet the property that does not have corresponding setter method.- Specified by:
setNonStandardPropertyin interfaceFirebirdConnectionProperties- Parameters:
propertyMapping- parameter value in the ?propertyName[=propertyValue]? form, this allows setting non-standard parameters using configuration files.
-
setPassword
- Specified by:
setPasswordin interfaceFirebirdConnectionProperties- Parameters:
password- password corresponding to the specified user name.
-
setRoleName
- Specified by:
setRoleNamein interfaceFirebirdConnectionProperties- Parameters:
roleName- SQL role to use.
-
setSocketBufferSize
public void setSocketBufferSize(int socketBufferSize) - Specified by:
setSocketBufferSizein interfaceFirebirdConnectionProperties- Parameters:
socketBufferSize- socket buffer size in bytes.
-
setSqlDialect
- Specified by:
setSqlDialectin interfaceFirebirdConnectionProperties- Parameters:
sqlDialect- SQL dialect of the client.
-
setTimestampUsesLocalTimezone
public void setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone) - Specified by:
setTimestampUsesLocalTimezonein interfaceFirebirdConnectionProperties- Parameters:
timestampUsesLocalTimezone-trueif the Jaybird 1.0 handling of the calendar in corresponding setters. This is also compatible with MySQL calendar treatment.
-
setTpbMapping
Description copied from interface:FirebirdConnectionPropertiesSet path to the properties file with the TPB mapping. The path begins with the protocol specification followed by the path to the resource. A special protocol"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 theConnectioninterface and a comma-separated list of TPB parameters.- Specified by:
setTpbMappingin interfaceFirebirdConnectionProperties- Parameters:
tpbMapping- path to the properties file.
-
setTransactionParameters
Description copied from interface:FirebirdConnectionPropertiesSet transaction parameters for the specified transaction isolation level. The specified TPB is used as a default mapping for the specified isolation level.- Specified by:
setTransactionParametersin interfaceFirebirdConnectionProperties- Parameters:
isolation- transaction isolation level.tpb- instance ofTransactionParameterBuffercontaining transaction parameters.
-
setType
- Specified by:
setTypein interfaceFirebirdConnectionProperties- Parameters:
type- type of the connection, for example, "PURE_JAVA", "LOCAL", "EMBEDDED", depends on the GDS implementations installed in the system.
-
setUserName
- Specified by:
setUserNamein interfaceFirebirdConnectionProperties- Parameters:
userName- name of the user that will be used when connecting to the database.
-
setUseStandardUdf
public void setUseStandardUdf(boolean useStandardUdf) - Specified by:
setUseStandardUdfin interfaceFirebirdConnectionProperties- Parameters:
useStandardUdf-trueif driver should assume that standard UDF are installed.
-
setUseStreamBlobs
public void setUseStreamBlobs(boolean useStreamBlobs) - Specified by:
setUseStreamBlobsin interfaceFirebirdConnectionProperties- Parameters:
useStreamBlobs-trueif stream blobs should be created, otherwisefalse.
-
isDefaultResultSetHoldable
public boolean isDefaultResultSetHoldable()Description copied from interface:FirebirdConnectionPropertiesGet the default ResultSet holdability.- Specified by:
isDefaultResultSetHoldablein interfaceFirebirdConnectionProperties- Returns:
truewhen ResultSets are holdable by default,falsenot holdable.
-
setDefaultResultSetHoldable
public void setDefaultResultSetHoldable(boolean isHoldable) Description copied from interface:FirebirdConnectionPropertiesSets the default ResultSet holdability.- Specified by:
setDefaultResultSetHoldablein interfaceFirebirdConnectionProperties- Parameters:
isHoldable-truewhen ResultSets are holdable by default,falsenot holdable.
-
setDefaultConnectionManager
public void setDefaultConnectionManager(javax.resource.spi.ConnectionManager defaultCm) -
getSoTimeout
public int getSoTimeout()Description copied from interface:FirebirdConnectionPropertiesGet the current Socket blocking timeout (SoTimeout).- Specified by:
getSoTimeoutin interfaceFirebirdConnectionProperties- Returns:
- The socket blocking timeout in milliseconds (0 is 'infinite')
-
setSoTimeout
public void setSoTimeout(int soTimeout) Description copied from interface:FirebirdConnectionPropertiesSet the Socket blocking timeout (SoTimeout).- Specified by:
setSoTimeoutin interfaceFirebirdConnectionProperties- Parameters:
soTimeout- Timeout in milliseconds (0 is 'infinite')
-
getConnectTimeout
public int getConnectTimeout()Description copied from interface:FirebirdConnectionPropertiesGet the current connect timeout.- Specified by:
getConnectTimeoutin interfaceFirebirdConnectionProperties- Returns:
- Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)
-
setConnectTimeout
public void setConnectTimeout(int connectTimeout) Description copied from interface:FirebirdConnectionPropertiesSet the connect timeout.- Specified by:
setConnectTimeoutin interfaceFirebirdConnectionProperties- Parameters:
connectTimeout- Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)
-
isUseFirebirdAutocommit
public boolean isUseFirebirdAutocommit()Description copied from interface:FirebirdConnectionPropertiesGet whether to use Firebird autocommit (experimental).- Specified by:
isUseFirebirdAutocommitin interfaceFirebirdConnectionProperties- Returns:
trueuse Firebird autocommit
-
setUseFirebirdAutocommit
public void setUseFirebirdAutocommit(boolean useFirebirdAutocommit) Description copied from interface:FirebirdConnectionPropertiesSet whether to use Firebird autocommit (experimental).- Specified by:
setUseFirebirdAutocommitin interfaceFirebirdConnectionProperties- Parameters:
useFirebirdAutocommit-trueUse Firebird autocommit
-
getWireCrypt
Description copied from interface:FirebirdConnectionPropertiesGet the wire encryption level value.- Specified by:
getWireCryptin interfaceFirebirdConnectionProperties- Returns:
- Wire encryption level (
nullimpliesDEFAULT)
-
setWireCrypt
Description copied from interface:FirebirdConnectionPropertiesSets the wire encryption level.Values are defined by
WireCrypt, values are handled case insensitive. Invalid values are accepted, but will cause an error when a connection is established.- Specified by:
setWireCryptin interfaceFirebirdConnectionProperties- Parameters:
wireCrypt- Wire encryption level
-
getDbCryptConfig
Description copied from interface:FirebirdConnectionPropertiesGet the database encryption plugin configuration.- Specified by:
getDbCryptConfigin interfaceFirebirdConnectionProperties- Returns:
- Database encryption plugin configuration, meaning plugin specific
-
setDbCryptConfig
Description copied from interface:FirebirdConnectionPropertiesSets the database encryption plugin configuration.- Specified by:
setDbCryptConfigin interfaceFirebirdConnectionProperties- Parameters:
dbCryptConfig- Database encryption plugin configuration, meaning plugin specific
-
getAuthPlugins
Description copied from interface:FirebirdConnectionPropertiesGet the list of authentication plugins to try.- Specified by:
getAuthPluginsin interfaceFirebirdConnectionProperties- Returns:
- comma-separated list of authentication plugins, or
nullfor driver default
-
setAuthPlugins
Description copied from interface:FirebirdConnectionPropertiesSets the authentication plugins to try.Invalid names are skipped during authentication.
- Specified by:
setAuthPluginsin interfaceFirebirdConnectionProperties- Parameters:
authPlugins- comma-separated list of authentication plugins, ornullfor driver default
-
getGeneratedKeysEnabled
Description copied from interface:FirebirdConnectionPropertiesGet thegeneratedKeysEnabledconfiguration.- Specified by:
getGeneratedKeysEnabledin interfaceFirebirdConnectionProperties- Returns:
- configuration value for
generatedKeysEnabled, ornullfor driver default
-
setGeneratedKeysEnabled
Description copied from interface:FirebirdConnectionPropertiesSets thegeneratedKeysEnabledconfiguration.- Specified by:
setGeneratedKeysEnabledin interfaceFirebirdConnectionProperties- Parameters:
generatedKeysEnabled- Generated keys support configuration:default(or null/empty),disabled,ignored, or a list of statement types to enable (possible values:insert,update,delete,update_or_insert,merge)
-
getDataTypeBind
Description copied from interface:FirebirdConnectionPropertiesGet thedataTypeBindconfiguration.- Specified by:
getDataTypeBindin interfaceFirebirdConnectionProperties- Returns:
- configuration value for
dataTypeBind, ornullfor driver default
-
setDataTypeBind
Description copied from interface:FirebirdConnectionPropertiesSets thedataTypeBindconfiguration.If the value is explicitly set to a non-null value and the connected server is Firebird 4 or higher, this will configure the data type binding with the specified values using
isc_dpb_set_bind, which is equivalent to executingSET BINDstatements with the values.See also Firebird documentation for
SET BIND.- Specified by:
setDataTypeBindin interfaceFirebirdConnectionProperties- Parameters:
dataTypeBind- Firebird 4+ data type bind configuration, a semicolon-separated list of<from-type> TO <to-type>
-
getSessionTimeZone
Description copied from interface:FirebirdConnectionPropertiesGet thesessionTimeZone.- Specified by:
getSessionTimeZonein interfaceFirebirdConnectionProperties- Returns:
- value for
sessionTimeZone, ornullfor driver default (JVM default time zone)
-
setSessionTimeZone
Description copied from interface:FirebirdConnectionPropertiesSets thesessionTimeZone.- Specified by:
setSessionTimeZonein interfaceFirebirdConnectionProperties- Parameters:
sessionTimeZone- Firebird 4+ session time zone name (we strongly suggest to use Java compatible names only), use"server"to use server default time zone (note: conversion will use JVM default time zone)
-
isIgnoreProcedureType
public boolean isIgnoreProcedureType()Description copied from interface:FirebirdConnectionPropertiesGet the value forignoreProcedureType.- Specified by:
isIgnoreProcedureTypein interfaceFirebirdConnectionProperties- Returns:
- value for
ignoreProcedureType
-
setIgnoreProcedureType
public void setIgnoreProcedureType(boolean ignoreProcedureType) Description copied from interface:FirebirdConnectionPropertiesSets the valueignoreProcedureType.When set to true, the
CallableStatementimplementation in Jaybird will ignore metadata information about the stored procedure type and default to usingEXECUTE PROCEDURE, unless the type is explicitly set usingFirebirdCallableStatement.setSelectableProcedure(boolean). This can be useful in situations where a stored procedure is selectable, but tooling or code expects an executable stored procedure.- Specified by:
setIgnoreProcedureTypein interfaceFirebirdConnectionProperties- Parameters:
ignoreProcedureType-trueIgnore procedure type
-
isWireCompression
public boolean isWireCompression()Description copied from interface:FirebirdConnectionPropertiesGet if wire compression should be enabled.Wire compression requires Firebird 3 or higher, and the server must have the zlib library. If compression cannot be negotiated, the connection will be made without wire compression.
This property will be ignored for native connections. For native connections, the configuration in
firebird.confread by the client library will be used.- Specified by:
isWireCompressionin interfaceFirebirdConnectionProperties- Returns:
truewire compression enabled
-
setWireCompression
public void setWireCompression(boolean wireCompression) Description copied from interface:FirebirdConnectionPropertiesSets if the connection should try to enable wire compression.- Specified by:
setWireCompressionin interfaceFirebirdConnectionProperties- Parameters:
wireCompression-trueenable wire compression,falsedisable wire compression (the default)- See Also:
-
hashCode
public int hashCode() -
equals
-
getDefaultConnectionRequestInfo
public FBConnectionRequestInfo getDefaultConnectionRequestInfo() throws javax.resource.ResourceException- Throws:
javax.resource.ResourceException
-
getDefaultTpb
- Throws:
javax.resource.ResourceException
-
getTpb
- Throws:
FBResourceException
-
createConnectionFactory
public Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager) throws javax.resource.ResourceException ThecreateConnectionFactorymethod creates a DataSource using the supplied ConnectionManager.- Specified by:
createConnectionFactoryin interfacejavax.resource.spi.ManagedConnectionFactory- Parameters:
cxManager- aConnectionManagervalue- Returns:
- a
java.lang.Objectvalue - Throws:
javax.resource.ResourceException- if an error occurs
-
createConnectionFactory
ThecreateConnectionFactorymethod creates a DataSource with a default stand alone ConnectionManager. Ours can implement pooling.- Specified by:
createConnectionFactoryin interfacejavax.resource.spi.ManagedConnectionFactory- Returns:
- a new
javax.sql.DataSourcebased around this connection factory - Throws:
javax.resource.ResourceException- if an error occurs
-
createManagedConnection
public javax.resource.spi.ManagedConnection createManagedConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException Creates a new physical connection to the underlying EIS resource manager, ManagedConnectionFactory uses the security information (passed as Subject) and additional ConnectionRequestInfo (which is specific to ResourceAdapter and opaque to application server) to create this new connection.- Specified by:
createManagedConnectionin interfacejavax.resource.spi.ManagedConnectionFactory- Parameters:
subject- Caller's security informationcri- Additional resource adapter specific connection request information- Returns:
- ManagedConnection instance
- Throws:
javax.resource.ResourceException- generic exceptionjavax.resource.spi.SecurityException- security related errorjavax.resource.spi.ResourceAllocationException- failed to allocate system resources for connection requestjavax.resource.spi.ResourceAdapterInternalException- resource adapter related error conditionjavax.resource.spi.EISSystemException- internal error condition in EIS instance
-
matchManagedConnections
public javax.resource.spi.ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo) throws javax.resource.ResourceException Returns a matched connection from the candidate set of connections. ManagedConnectionFactory uses the security info (as inSubject) and information provided throughConnectionRequestInfoand additional Resource Adapter specific criteria to do matching. Note that criteria used for matching is specific to a resource adapter and is not prescribed by theConnectorspecification.This method returns a
ManagedConnectioninstance that is the best match for handling the connection allocation request.- Specified by:
matchManagedConnectionsin interfacejavax.resource.spi.ManagedConnectionFactory- Parameters:
connectionSet- candidate connection setsubject- caller's security informationcxRequestInfo- additional resource adapter specific connection request information- Returns:
- ManagedConnection if resource adapter finds an acceptable match otherwise null
- Throws:
javax.resource.ResourceException- - generic exceptionjavax.resource.spi.SecurityException- - security related errorjavax.resource.spi.ResourceAdapterInternalException- - resource adapter related error conditionjavax.resource.NotSupportedException- - if operation is not supported
-
setLogWriter
Set the log writer for thisManagedConnectionFactoryinstance. The log writer is a character output stream to which all logging and tracing messages for thisManagedConnectionFactoryinstance will be printed. ApplicationServer manages the association of output stream with theManagedConnectionFactory. When aManagedConnectionFactoryobject is created the log writer is initiallynull, in other words, logging is disabled. Once a log writer is associated with aManagedConnectionFactory, logging and tracing forManagedConnectionFactoryinstance is enabled.The
ManagedConnectioninstances created byManagedConnectionFactory"inherits" the log writer, which can be overridden by ApplicationServer usingManagedConnection.setLogWriter(java.io.PrintWriter)to setManagedConnectionspecific logging and tracing.- Specified by:
setLogWriterin interfacejavax.resource.spi.ManagedConnectionFactory- Parameters:
out- an out stream for error logging and tracing- Throws:
javax.resource.ResourceException- generic exceptionjavax.resource.spi.ResourceAdapterInternalException- resource adapter related error condition
-
getLogWriter
Get the log writer for thisManagedConnectionFactoryinstance. The log writer is a character output stream to which all logging and tracing messages for thisManagedConnectionFactoryinstance will be printed. ApplicationServer manages the association of output stream with theManagedConnectionFactory. When aManagedConnectionFactoryobject is created the log writer is initially null, in other words, logging is disabled.- Specified by:
getLogWriterin interfacejavax.resource.spi.ManagedConnectionFactory- Returns:
- PrintWriter instance
- Throws:
javax.resource.ResourceException- generic exception
-
canonicalize
Thecanonicalizemethod is used in FBDriver to reuse previous fbmcf instances if they have been create. It should really be package access level- Returns:
- a
FBManagedConnectionFactoryvalue
-
forget
- Throws:
GDSException
-
recover
- Throws:
GDSException
-
getCacheKey
-
getBlobBufferSize()