0
votes

I wanted to configure XA datasource for Mariadb in REDHAT JBoss EAP 7.0. I
I have created a non-XA datasource with below details and connection is working fine.
Driver: mysql-connector-java-5.1.46.jar_com.mysql.jdbc.Driver_5_1
Connection URL: jdbc:mysql://localhost:3306/test

But when I tried to create new XA datasource for distributed transactions then it fails with error detail.
Unexpected HTTP response: 500
Request
{
"address" => [ ("subsystem" => "datasources"), ("xa-data-source" => "MysqlXADS1") ],
"operation" => "test-connection-in-pool"
}

Response<br>

Internal Server Error<br>
{`enter code here`
    "outcome" => "failed",
    "failure-description" => "WFLYJCA0040: failed to invoke operation: WFLYJCA0042: failed to match                 
      pool. Check JndiName: java:/MysqlXADS1",
     "rolled-back" => true
  }


Configuration Details :
Driver: mysql-connector-java-5.1.46.jar_com.mysql.jdbc.jdbc2.optional.MysqlXADataSource_5_1
Url: jdbc:mariadb://localhost:3306/test
Valid Connection Checker: org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker
Exception Sorter: org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter

1

1 Answers

0
votes

JBoss EAP support for MariaDB started on version 7.0 so your version is not a problem.

From the error WFLYJCA0040: failed to invoke operation: WFLYJCA0042: failed to match pool. Check JndiName, and assuming the jdbc name is correctly assigned, I believe your issue will be solved on step 1.3 and 2, as below:

  1. When setting up a data source on JBoss EAP 7.0:

    • deploy the driver
    • create the datasource
    • Verify the pool size, removing the line <max-pool-size>0</max-pool-size> as explained here.
    • reload
  2. For your version, JBoss EAP 7.0 : Remember to enable the DB:

#/subsystem=datasources/data-source=MyExampleDS:enable()                               
#/subsystem=datasources/data-  source=MyExampleDS:test-connection-in-pool()