Determining Factors for using XA or non-XA Datasources with V5 and V6
 Technote (FAQ)
 
Problem
This technote explains when you should use an XA datasource and when you should use a non-XA datasource.
 
Solution
An XA datasource is sometimes described as two-phase commit (2PC) because that is the mechanism used to implement the Atomic, Consistent, Isolated, Durable (ACID) properties of a transaction with multiple resources.

If multiple connections to a database or more than one transactional resource is accessed in a transaction, an XA datasource must be used.

WebSphere® Application Server's connection sharing optimization makes it unnecessary to use 2PC if all the following criteria are met:
  • Connections all made from the same Java™ Virtual Machine (JVM™)
  • Connections all made from the same datasource
  • Connections all made using the same username and password

If any of these constraints are violated, a 2PC datasource must be used.

In other words, if any of the following are true, a 2PC datasource must be used:
  • There are connections from two or more datasources (both must be 2PC)
  • There are two or more JVMs making connections
  • The connections come from the same datasource, but with different credentials
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java 2 Connectivity (J2C)
Operating system(s): Windows
Software version: 6.1
Software edition:
Reference #: 1154779
IBM Group: Software Group
Modified date: Sep 9, 2004