Package com.ibm.websphere.rsadapter
Interface WSDataSource
- All Superinterfaces:
CommonDataSource,DataSource,Wrapper
This interface enables an application to provide additional parameters when requesting a
Connection. These parameters are provided in a ConnectionSpec object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intError code for SQLException that indicates that the connection pool is paused.static final StringWith the IMMEDIATE_PURGE option, the purged pool will behave as follows after the purge call: No new transactions will be allowed to start on any connections obtained prior to thepurgePoolContents()call.static final StringWith the NORMAL_PURGE option, the purged pool will behave as follows after the purge call: Existing in-flight transactions will be allowed to continue work Shared connection requests will be honored Free connections are cleanup and destroyed In use connection (i.e. -
Method Summary
Modifier and TypeMethodDescriptiongetConnection(JDBCConnectionSpec connSpec) Requests a connection that matches the information provided in the JDBCConnectionSpec.booleanIndicates whether or not the underlying data source is an XADataSource, capable of two phase commit.Methods inherited from interface javax.sql.CommonDataSource
getLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriterMethods inherited from interface javax.sql.DataSource
getConnection, getConnectionMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Field Details
-
ERROR_CONNECTION_POOL_IS_PAUSED
static final int ERROR_CONNECTION_POOL_IS_PAUSEDError code for SQLException that indicates that the connection pool is paused.- See Also:
-
NORMAL_PURGE
With the NORMAL_PURGE option, the purged pool will behave as follows after the purge call:- Existing in-flight transactions will be allowed to continue work
- Shared connection requests will be honored
- Free connections are cleanup and destroyed
- In use connection (i.e. connections in transactions) are cleanup and destroyed when returned to the connection pool
-
close()calls issued on any connections obtained prior to thepurgePoolcall will be done synchronously (i.e. wait for the JDBC driver to come back before proceeding) - Requests for new connections (not handles to existing old connections) will be honored.
- See Also:
-
IMMEDIATE_PURGE
With the IMMEDIATE_PURGE option, the purged pool will behave as follows after the purge call:- No new transactions will be allowed to start on any connections obtained prior to the
purgePoolContents()call. Instead, a StaleConnectionException is thrown - No new handles are allowed to be handed out on any connections obtained prior to the
purgePoolContents()call. Instead, a StaleConnectionException is thrown - Existing in-flight transactions will be allowed to continue work, any new activities on the purgedConnection will cause a StaleConnectionException or an XAER_FAIL exception
-
close()calls issued on any connections obtained prior to thepurgePoolContents()call will be done asynchronously (i.e. no wait time) - Requests for new connections (i.e. not handles to existing old connections) will be honored.
- Number of connections will be decremented immediately. This may cause the total number of connections in Liberty to be, temporarily, out of sync with the database total number of connections
- See Also:
- No new transactions will be allowed to start on any connections obtained prior to the
-
-
Method Details
-
getConnection
Requests a connection that matches the information provided in the JDBCConnectionSpec. The application can specify the catalog, cursor holdability, isReadOnly, network timeout, schema, transaction isolation level, and typeMap attributes, allowing for the underlying Connection to be shared based on the above criteria.- Parameters:
connSpec- information used to establish the Connection, such as user name, password, and type map. This value should never be null.- Returns:
- the Connection
- Throws:
SQLException- if an error occurs while obtaining a Connection.
-
isXADataSource
boolean isXADataSource()Indicates whether or not the underlying data source is an XADataSource, capable of two phase commit.- Returns:
- true if the underlying data source is an XADataSource, capable of two phase commit, otherwise false.
-