DB2 10.5 for Linux, UNIX, and Windows

Java transaction management

Java™ 2 Platform, Enterprise Edition (J2EE) simplifies application programming for distributed transaction management.

J2EE includes support for distributed transactions through two specifications, Java Transaction API (JTA) and Java Transaction Service (JTS). JTA is a high-level, implementation-independent, protocol-independent API that allows applications and application servers to access transactions. In addition, the JTA is always enabled.

The IBM® Data Server Driver for JDBC and SQLJ implements the JTA and JTS specifications.

For IBM Data Server Driver for JDBC and SQLJ type 4 connectivity distributed transactions are supported to DB2® for Linux, UNIX, and Windows, DB2 for z/OS®, and DB2 for i servers.

JTA specifies standard Java interfaces between a transaction manager and the parties involved in a distributed transaction system: the resource manager, the application server, and the transactional applications.

JTS specifies the implementation of a Transaction Manager which supports JTA and implements the Java mapping of the OMG Object Transaction Service (OTS) 1.1 specification at the level below the API. JTS propagates transactions using IIOP.

JTA and JTS allow application J2EE servers to take the burden of transaction management off of the component developer. Developers can define the transactional properties of EJB technology based components during design or deployment using declarative statements in the deployment descriptor. The application server takes over the transaction management responsibilities.

In the WebSphere® Application Server environment, WebSphere Application Server assumes the role of transaction manager, and the database manager acts as a resource manager. WebSphere Application Server implements JTS and part of JTA, and the JDBC drivers also implement part of JTA so that WebSphere Application Server and the database manager can provide coordinated distributed transactions.

It is not necessary to configure the database manager to be JTA-enabled in the WebSphere Application Server environment because the JDBC drivers automatically detect this environment.

The IBM Data Server Driver for JDBC and SQLJ provides these two DataSource classes:

WebSphere Application Server provides pooled connections to databases. If the application will be involved in a distributed transaction, the com.ibm.db2.jdbc.DB2XADataSource class should be used when defining data sources within the WebSphere Application Server.

For the detail information about how to configure the WebSphere Application Server, refer to WebSphere Application Server InfoCenter at:
http://www.ibm.com/software/webservers/appserv/library.html