St.Antario
St.Antario

Reputation: 27395

Why should we define "xa-datasource-class" within a driver configuration in JBoss?

I'm using JBoss7AS and have the following data-source driver definition:

<drivers>
  <driver name="com.mysql" module="com.mysql">
    <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
  </driver>
</drivers>

I'm a bit cinfused by xa-datasource-class subtag. Does it have something to do with transactions (E.g. JTA transactions, because they use some kind of XA-interfaces)? So if we delete that subtag we won't be able to use JTA-transaction in our application, right?

Upvotes: 3

Views: 5927

Answers (1)

StuartLC
StuartLC

Reputation: 107277

Yes, XA is needed by the JTA to coordinate distributed transactions.

XA refers to the X/Open XA standard, which is a distributed transaction protocol, allowing ACID transactions to span across multiple resources which are XA compliant (this can include transactions across multiple databases of different RDBMS vendors, queues, transactional file systems, etc).

Specifically, for the config setting, from the docs:

xa-datasource-class : The fully qualified name of the javax.sql.XADataSource implementation class, for example, com.informix.jdbcx.IfxXADataSource.

Upvotes: 2

Related Questions