Jboss EAP 6.4 Mysql XA-Datasource Problem
olgun.kaya Jun 16, 2016 1:20 AMHi,
We have upgradede from eap-6.3 to eap-6.4 and our working datasource configuration is not working anymore.
The error we are receiving is :
Unexpected HTTP response: 500
Request
{
"address" => [
("host" => "sv-host"),
("server" => "sc-host-1"),
("subsystem" => "datasources"),
("xa-data-source" => "jdbc_facebook_data_source")
],
"operation" => "test-connection-in-pool"
}
Response
Internal Server Error
{
"outcome" => "failed",
"result" => undefined,
"failure-description" => "JBAS010440: failed to invoke operation: JBAS010442: failed to match pool. Check JndiName: java:/jdbc/facebook_data_source",
"rolled-back" => true
}
Configuration :
Module Configuration
In : /usr/local/jboss/modules/com/mysql/main //where jboss is a link to eap-6.4
module.xml
<module xmlns="urn:jboss:module:1.0" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.38-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
and the jar is sitting next to this module.xml file.
Domain Configuration
path : /usr/local/jboss/domain/configuration //where again jboss is a link to eap-6.4
domain.xml
<xa-datasource jndi-name="java:/jdbc/facebook_data_source" pool-name="jdbc_facebook_data_source" enabled="true" use-ccm="false">
<xa-datasource-property name="User">
**********
</xa-datasource-property>
<xa-datasource-property name="Password">
*********
</xa-datasource-property>
<xa-datasource-property name="URL">
jdbc:mysql://<ip>:<port>/<dbname>
</xa-datasource-property>
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
<driver>com.mysql</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>100</max-pool-size>
<use-strict-min>false</use-strict-min>
<is-same-rm-override>false</is-same-rm-override>
<interleaving>false</interleaving>
<no-tx-separate-pools>true</no-tx-separate-pools>
<pad-xid>false</pad-xid>
<wrap-xa-resource>false</wrap-xa-resource>
</xa-pool>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<timeout>
<set-tx-query-timeout>false</set-tx-query-timeout>
<blocking-timeout-millis>0</blocking-timeout-millis>
<idle-timeout-minutes>3</idle-timeout-minutes>
<query-timeout>0</query-timeout>
<use-try-lock>0</use-try-lock>
<allocation-retry>0</allocation-retry>
<allocation-retry-wait-millis>0</allocation-retry-wait-millis>
<xa-resource-timeout>0</xa-resource-timeout>
</timeout>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</xa-datasource>
<driver name="com.mysql" module="com.mysql">
<driver-class>com.mysql.jdbc.Driver</driver-class>
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
This config was working properly with eap-6.3