- All Implemented Interfaces:
CommonDataSource,AttachmentProperties,BaseProperties,DatabaseConnectionProperties,FirebirdConnectionProperties
- Direct Known Subclasses:
FBConnectionPoolDataSource,FBXADataSource
- Since:
- 2.2
- Author:
- Mark Rotteveel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidMethod to check if this DataSource has not yet started.An unmodifiable view on the connection properties held by this BaseProperties implementation.getBooleanProperty(String name) Retrieves abooleanproperty value by name.protected final FBConnectionPropertiesgetIntProperty(String name) Retrieves anintproperty value by name.getProperty(String name) Retrieves a string property value by name.getTransactionParameters(int isolation) Get the transaction parameter buffer corresponding to the current connection request information.voidsetBooleanProperty(String name, Boolean value) Sets abooleanproperty by name.protected final voidsetConnectionProperties(FBConnectionProperties connectionProperties) voidsetDescription(String description) voidsetIntProperty(String name, Integer value) Sets anintproperty by name.final voidsetNonStandardProperty(String propertyMapping) Method that allows setting non-standard property in the form "key=value" form.voidsetProperty(String name, String value) Sets a property by name.voidsetTransactionParameters(int isolation, TransactionParameterBuffer tpb) Set transaction parameters for the specified transaction isolation level.protected static voidupdateReference(Reference ref, FBAbstractCommonDataSource instance) Updates the supplied reference with RefAddr properties relevant to this class.protected final LockCloseablewithLock()Methods inherited from class org.firebirdsql.ds.AbstractConnectionPropertiesDataSource
getAuthPlugins, getBlobBufferSize, getCharSet, getConnectTimeout, getDatabaseName, getDataTypeBind, getDbCryptConfig, getDecfloatRound, getDecfloatTraps, getDefaultIsolation, getDefaultTransactionIsolation, getEnableProtocol, getEncoding, getGeneratedKeysEnabled, getLoginTimeout, getPageCacheSize, getParallelWorkers, getPassword, getPortNumber, getProcessId, getProcessName, getReportSQLWarnings, getRoleName, getScrollableCursor, getServerBatchBufferSize, getServerName, getSessionTimeZone, getSocketBufferSize, getSocketFactory, getSoTimeout, getSqlDialect, getTpbMapping, getType, getUser, getUserName, getWireCrypt, isAllowTxStmts, isAsyncFetch, isColumnLabelForName, isCreateDatabaseIfNotExist, isDefaultResultSetHoldable, isExtendedMetadata, isIgnoreProcedureType, isUseCatalogAsPackage, isUseFirebirdAutocommit, isUseServerBatch, isUseStreamBlobs, isWireCompression, setAllowTxStmts, setAsyncFetch, setAuthPlugins, setBlobBufferSize, setCharSet, setColumnLabelForName, setConnectTimeout, setCreateDatabaseIfNotExist, setDatabaseName, setDataTypeBind, setDbCryptConfig, setDecfloatRound, setDecfloatTraps, setDefaultIsolation, setDefaultResultSetHoldable, setDefaultTransactionIsolation, setEnableProtocol, setEncoding, setExtendedMetadata, setGeneratedKeysEnabled, setIgnoreProcedureType, setLoginTimeout, setPageCacheSize, setParallelWorkers, setPassword, setPortNumber, setProcessId, setProcessName, setReportSQLWarnings, setRoleName, setScrollableCursor, setServerBatchBufferSize, setServerName, setSessionTimeZone, setSocketBufferSize, setSocketFactory, setSoTimeout, setSqlDialect, setTpbMapping, setType, setUseCatalogAsPackage, setUseFirebirdAutocommit, setUser, setUserName, setUseServerBatch, setUseStreamBlobs, setWireCompression, setWireCryptMethods inherited from class org.firebirdsql.ds.RootCommonDataSource
getLogWriter, getParentLogger, setLogWriterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.firebirdsql.jaybird.props.BaseProperties
getBooleanProperty, getIntProperty, getPropertyMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Field Details
-
REF_DESCRIPTION
- See Also:
-
REF_PROPERTIES
- See Also:
-
-
Constructor Details
-
FBAbstractCommonDataSource
public FBAbstractCommonDataSource()
-
-
Method Details
-
withLock
-
checkNotStarted
Method to check if this DataSource has not yet started.Implementations should throw IllegalStateException when the DataSource is already in use and modifying properties is not allowed.
- Throws:
IllegalStateException- When the DataSource is already in use
-
getDescription
-
setDescription
-
getTransactionParameters
Description copied from interface:FirebirdConnectionPropertiesGet the transaction parameter buffer corresponding to the current connection request information.- Parameters:
isolation- transaction isolation level for which TPB should be returned.- Returns:
- instance of
TransactionParameterBuffer.
-
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.- Parameters:
isolation- transaction isolation level.tpb- instance ofTransactionParameterBuffercontaining transaction parameters.
-
setNonStandardProperty
Method that allows setting non-standard property in the form "key=value" form. This method is needed by some containers to specify properties in the configuration.- Parameters:
propertyMapping- mapping between property name (key) and its value. Name and value are separated with "=", ":" or whitespace character. Whitespace characters on the beginning of the string and between key and value are ignored. No escaping is possible: "\n" is backslash-en, not a new line mark.- See Also:
-
getProperty
Description copied from interface:BasePropertiesRetrieves a string property value by name.For properties with an explicit default, this method should return the string presentation of that default, not
null. Forintorbooleanthe string equivalent is returned.- Parameters:
name- Property name (notnullor empty)- Returns:
- Value of the property, or
nullwhen not set or not a known property
-
setProperty
Description copied from interface:BasePropertiesSets a property by name.This method can be used to set all defined properties, but also properties not known by Jaybird. When setting
intorbooleanproperties, the appropriate conversions are applied. Usingnullwill reset to the default value. Forbooleanproperties, an empty string is taken to meantrue.- Parameters:
name- Property name (notnullor empty)value- Property value (usenullto apply default)
-
getIntProperty
Description copied from interface:BasePropertiesRetrieves anintproperty value by name.For properties with an explicit default, this method should return the integer presentation of that default. For implementation simplicity, it is allowed to convert any string property to
intinstead of checking if something is actually anintproperty- Parameters:
name- Property name (notnullor empty)- Returns:
- Integer with value of the property, or
nullwhen not set
-
setIntProperty
Description copied from interface:BasePropertiesSets anintproperty by name.For implementation simplicity, it is allowed to also set string properties. The value set will be the string equivalent.
- Parameters:
name- Property name (notnullor empty)value- Property value (usenullto apply default)
-
getBooleanProperty
Description copied from interface:BasePropertiesRetrieves abooleanproperty value by name.For properties with an explicit default, this method should return the boolean presentation of that default. For implementation simplicity, it is allowed to convert any string property to
booleaninstead of checking if something is actually abooleanproperty- Parameters:
name- Property name (notnullor empty)- Returns:
- Integer with value of the property, or
nullwhen not set
-
setBooleanProperty
Description copied from interface:BasePropertiesSets abooleanproperty by name.For implementation simplicity, it is allowed to also set string properties. The value set will be the string equivalent.
- Parameters:
name- Property name (notnullor empty)value- Property value (usenullto apply default)
-
connectionPropertyValues
Description copied from interface:BasePropertiesAn unmodifiable view on the connection properties held by this BaseProperties implementation.Be aware, implementations can have additional properties that are not mapped from
ConnectionProperty. Such properties will need to be retrieved in an implementation-specific manner.- Returns:
- An unmodifiable view on the property values held in this properties instance
-
setConnectionProperties
-
getConnectionProperties
-
updateReference
protected static void updateReference(Reference ref, FBAbstractCommonDataSource instance) throws NamingException Updates the supplied reference with RefAddr properties relevant to this class.- Parameters:
ref- Reference to updateinstance- Instance of this class to obtain values- Throws:
NamingException
-