Red Hat Bugzilla – Bug 976563
xa datasource does not failover nor recover
Last modified: 2014-09-25 06:43:10 EDT
Created attachment 763566 [details]
modified quickstart greeter, eap configuration, and server.log
Description of problem:
failover or recovery of a datasource is not working.
Enabled url-delimiter using Byteman following: https://bugzilla.redhat.com/show_bug.cgi?id=901221
When first database fails, the next request for data is NOT sent to the second database url. Instead, a connection failure to the first database is reported in an exception.
Additionally, when the first database is restored, the datasouce pool does not recover. Connection errors continue.
Expecting to failover to the second database, and for the recovery of the first database to be detected and then utilized.
Version-Release number of selected component (if applicable):
15:23:39,195 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8) starting
Steps to Reproduce:
1. configure jboss for xa-datasource with two urls, using Byteman script, as described above.
2. activate both databases.
3. load an application that requires data access and demonstrate success.
4. turn off the database with the first of the two urls and demonstrate failure of the application to access data.
5. restore the database and demonstrate continued failure to access data.
Attached is a modified version of eap 6.1.0 quickstart greeter. There is one table: Users. Modified in the following ways:
1) persistence.xml modified to avoid drop-create
2) mysql sql script to load database run manually on each database.
3) import.sql file is moved out of build to avoid it being run.
database failures after first shutdown and onward.
data access success using alternate databse and,
restoration of first datasource after database restores.
Also included in the attached zip file:
the byteman script
the standalone.xml file with the xa datasource
Martin, feel free to look at this - or close
url-delimiter isn't supported for xa-dasources and also byteman isn't supported in production.