XA Vs Non-XA DataSource


XA and Non XA are transaction protocol for a JDBC data source that determines how the connections are handled from a data source during any transaction.

XA data source:

· In simple term XA datasource supports “global transaction”. It supports two way commit operation.

Let’s understand this with an example:


Oracle OSB Proxy service updating more than one database table using update query as shown below:

(Image 1)


If all the three queries are dependent on each other and any of the three query gets failed while updating table then the whole transaction will be rolled back.

So this is a “global transaction”. If we “commit”, it will do commit across all the resources and “rollback” will revert all of the resource’s updates done in the transaction.

Conclusion: It has transaction coordinating manager that allows to handle multiple requests.


Non XA data source:

· In simple term Non XA datasource supports “single transaction”. Non XA transaction always commit/rollback single resource/operation.

· You can compare Non XA as simple jdbc call in JAVA, we will create one connection and update table than finally release connection for particular query.

Let’s understand this with an example:


· As per Image 1, if we want to update all the queries independently, we need to create data source support Non XA transaction.

Conclusion: It has no transaction coordinating manager that’s why it can handle one request at a time.


· XA datasource support global transaction, so it requires less database transaction compare to Non XA datasource.

· If you got multiple requests at a time, there might be a chance of getting Non XA connection pool full and causing failure.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s