I
Insight Horizon Media

What is XA data source?

Author

Robert Miller

Published Mar 14, 2026

What is XA data source?

An XA data source is also known as a 2pc (two phase commit data source). A 1pc data source can be included in a transaction with 2pc data sources as long as you use the Last Participant Support (LPS) for the 1pc data source.

What is a datasource in Jboss?

A Datasource is the component used by Enterprise applications to connect to the database. The datasource, in turn, uses a Driver to communicate with the underlying database. For this reason, a driver can be installed as a module (that is, static deployment) or it can be deployed as any normal application.

How do you set up a datasource?

2. Configuring a DataSource

  1. 2.1. Maven. If not already defined, include spring-boot-starter-data-jpa to project.
  2. 2.2. application. properties.
  3. 2.3. DataSource Bean. Recommended way to create DataSource bean is using DataSourceBuilder class within a class annotated with the @Configuration annotation.
  4. 2.4. JNDI DataSource.

How do you make a Wildfly datasource?

Method 1: Add datasource via Admin-Console (the easy method)

  1. Add the JDBC Driver. Open the console from the browser ( for a local server) Then in Deployments, to add to open the wizard.
  2. Configure you datasource. Add a new datasource by clicking on ‘Start’ on the right of ‘Create a Datasource’.

What is difference between XA DataSource and non-XA data source?

An XA transaction, in the most general terms, is a “global transaction” that may span multiple resources. A non-XA transaction always involves just one resource.

What is XA and non-Xa in Jboss?

An XA transaction involves a coordinating transaction manager, with one or more resources (databases\JMS) all involved in a single global transaction. Non-XA transactions have no transaction coordinator, and a single resource is doing all its transaction work itself (also called local transactions).

What is blocking timeout Millis?

The blocking-timeout-millis element indicates the maximum time in milliseconds to block while waiting for a connection before throwing an exception. Note that this blocks only while waiting for a permit for a connection, and will never throw an exception if creating a new connection takes an inordinately long time.

What is JNDI name of datasource?

Naming References and Binding Information

JNDI Lookup NameAssociated Reference
java:comp/envApplication environment entries
java:comp/env/jdbcJDBC DataSource resource
java:comp/env/mailJavaMail Session Connection Factories
java:comp/env/urlURL Connection Factories

How do you define DataSource?

A data source is the location where data that is being used originates from. A data source may be the initial location where data is born or where physical information is first digitized, however even the most refined data may serve as a source, as long as another process accesses and utilizes it.

How do you configure a DataSource in spring?

To configure your own DataSource , define a @Bean of that type in your configuration. Spring Boot reuses your DataSource anywhere one is required, including database initialization. If you need to externalize some settings, you can bind your DataSource to the environment (see “Section 25.8.

How do I create a datasource in JBoss EAP 7?

click Administration console.

  1. In Jboss Administration console you can press New datasource button, enter datasource name and jndi name then click next button.
  2. step 2 : select postgresql driver. click Next.
  3. Step 3: enter connection URL jdbc:postgresql://localhost:5432/template1 , Username and Password.
  4. finally click Done.

What is connection pool in JBoss?

When connecting to a data source, JBoss Enterprise Application Platform must allocate resources and de-allocate resources for every connection. Connection pooling reduces the cost of data source connections by creating a number (“pool”) of data source connections available to be shared by applications.

How do I remove an XA DataSource from JBoss EAP 6?

This topic covers the steps required to remove an XA datasource from JBoss EAP 6, using either the Management Console or the Management CLI. Section 2.2.1, “Start JBoss EAP 6” . Procedure 6.11. Remove an XA Datasource Using Either the Management CLI or the Management Console Section 3.4.2, “Launch the Management CLI” .

How do I add the XA DataSource to the server?

Enter the connection settings in the Create XA Datasource wizard. Click the Test Connection button to test the connection to the XA datasource and verify the settings are correct. The XA datasource has been added to the server. It is now visible in either the standalone.xml or domain.xml file, as well as the management interfaces.

How do I connect to XA using JDBC?

Enter the JDBC driver details in the Create XA Datasource wizard and click Next . Enter the XA properties and click Next . Enter the connection settings in the Create XA Datasource wizard. Click the Test Connection button to test the connection to the XA datasource and verify the settings are correct.

What is the difference between and?

Note that both and handle distributed transactions involving multiple data sources. The difference is that handles them only within a single running application server, whereas handles them among many running application servers.