WebSphere Adapter for JDBC

Outbound processing

When an appplication component needs to invoke an operation on the enterprise information system (EIS), for example to retrieve data, the Adapter for JDBC acts as the connector between the application component and the EIS. The adapter provides certain outbound operations. The standard outbound operations can process either after-image or delta style business objects. The adapter also supports both local and XA transactions for outbound operations.

Outbound operations

The adapter supports two business object styles that relate to the amount and purpose of information conveyed by the business object: after-image and delta. An after-image is the state of a business object after all changes have been made to it. A delta is a business object used in an update operation that contains only key values and the data to be changed.

The adapter provides after-image support for the following operations:
  • Create
  • Update
  • Delete
The adapter provides delta support for the following operation:
  • ApplyChanges

Outbound operations without after-image or delta support::

Verbs are definable only for after-image business objects. A verb reflects the state of the business object, whereas an operation reflects the operation to be performed by the adapter. The top-level verbs supported for after-image are:
  • Create
  • Update
  • Delete
  • UpdateWithDelete

For details on how the adapter processes business objects for each of the supported outbound operations, see the "Outbound operations" section.

Transaction management

The Adapter for JDBC supports both local and XA transactions. In the adapter, a transaction is an isolated interaction with the back-end database, or enterprise information system (EIS). A transaction can consist of multiple operations on the database that are performed as an atomic unit. These operations are not affected by simultaneously occurring operations from other client applications of the database.

The Adapter for JDBC supports transactions only if the back-end database supports transactions. The types of transactions that are supported are local and XA transactions:
  • In a local transaction, a given client application defines the start and end of the transaction with the database. It uses a one-phase-commit protocol.
  • In an XA transaction, the transaction spans multiple heterogeneous databases. It uses a global or two-phase-commit protocol.

XA transactions for IBM® DB2® and Oracle databases

The adapter supports XA transactions for IBM DB2 and Oracle databases only.

Use the properties XADataSourceName and XADatabaseName with XA transactions. See the "Managed (J2C) connection factory properties" in the "Reference" section for details about these properties.

Sample values for two XA transaction properties are provided below:

IBM DB2

XADataSourceName for Type 2 Driver (db2java.zip): COM.ibm.db2.jdbc.DB2XADataSource

XADataSourceName for Type 4 Driver (db2jcc.jar): com.ibm.db2.jcc.DB2XADataSource

XADatabaseName : <dbname>
where dbname is the name of the database.

Oracle

XADataSourceName: oracle.jdbc.xa.client.OracleXADataSource

Note: If you are using a DB2 database, you must configure the XADatabaseName property. If you are using an Oracle database, no value is required for the XADatabaseName property.

Transaction support with DataSourceJNDIName

If the DataSourceJNDIName property is defined as a local or XA transaction data source, then the adapter uses this property for obtaining the inbound or outbound connection to the database. The DataSourceJNDIName represents the DataSource created within WebSphere® Process Server or WebSphere Enterprise Service Bus. This name could represent an XA or Connection Pool data source.

If UserName and Password properties are provided, these are used along with DataSourceJNDIName to obtain the connection. If UserName and Password are not provided, the adapter uses the username and password that were set when DataSource was created within the server. All other properties, such as JDBCDriverClass, DatabaseURL and the XA properties, XA DataSourceName and XADatabaseName, are ignored.
Important: XA transaction support is not restricted to IBM DB2 and Oracle databases if you use XA data sources through the DataSourceJNDIName property. The database restriction applies to XA transaction support using non-data source connection to a database.

Terms of use |

Last updated: Tue 12 Dec 2006 03:32:39

(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)