---
schema_version: "1"
id: 988d694279b699efe113628a7054bde25d17d9d361083549245f864e09b0522a
title: Using XA Transactions in Database Connector
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/db-connector/1.15/database-connector-xa-transactions.md
canonical_url: https://docs.mulesoft.com/db-connector/1.15/database-connector-xa-transactions
source_site: docs.mulesoft.com
content_type: documentation
content_hash: d54124ab50cdf5a474cc9a34b7fcd0006e4e0127195ffe10d200e9184938688c
description: MuleSoft Documentation Site
release: "1.15"
latest: false
---
---
product: Database Connector
version: 1.15
---

# Using XA Transactions in Database Connector

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Connector for Database (Database Connector) provides the option to use Extended
Architecture Transactions (XA Transactions) when you enable the **Use XA Transactions** field in the
Database Connector global configuration.

## Before You Begin

Before getting started, ensure that you have an understanding of
[XA Transactions](https://docs.mulesoft.com/mule-runtime/latest/xa-transactions)

## Use XA Transactions

You can enable the **Use XA Transactions** field in the database global connector configuration for
the **Derby Connection**, **Generic Connection**, **Microsoft SQL Server Connection**, **MySQL
Connection**, and **Oracle Connection**. For a **Data Source Reference Connection**, refer to the
[Configure a Data Source Reference Connection When in XA Transaction Mode](https://docs.mulesoft.com/db-connector/1.15/database-connector-connection#data-source-connection-xa)
topic.

> [!NOTE] When you enable **Use XA Transactions** the connection pooling is created as well.

The following example shows how to configure **Use XA Transactions** for the **MySQL Connection** in
Anypoint Studio:

1.  In Studio, navigate to the **Global Elements** tab.

2.  Click **Create**.

3.  In the search bar, type `database`.

4.  Select **Database Config**.

5.  Click **OK**.

6.  In the **Global Element Properties** window, select **MySQL Connection** in the **Connection**
    field.

7.  Select the **Transactions** tab.

8.  Select **Use XA Transactions**, which indicates that the created data source must support XA
    transactions.  
    Note that the implementation creates an Enhydra XADatasource.

9.  Configure other required database configurations in the **General** and **Advanced** tabs.

10. Click **OK**.

![Use XA Transactions field selected](/mulesoft/current/en-us/db-connector/1.15/_images/database-connector-xatransactions.png)

In the **Configuration XML** editor window, the configuration looks like this:

```xml
<db:config name="Database_Config" doc:name="Database Config" >
		<db:derby-connection useXaTransactions="true" />
	</db:config>
```

## See Also

- [Configuring the Bitronix Transaction Manager](https://docs.mulesoft.com/mule-runtime/latest/using-bitronix-to-manage-transactions#configuring-the-bitronix-transaction-manager)
