Bug 976563 - xa datasource does not failover nor recover
xa datasource does not failover nor recover
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JCA (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Martin Simka
Depends On:
  Show dependency treegraph
Reported: 2013-06-20 15:44 EDT by John
Modified: 2014-09-25 06:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-09-25 06:43:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
modified quickstart greeter, eap configuration, and server.log (37.24 KB, application/zip)
2013-06-20 15:44 EDT, John
no flags Details

  None (edit)
Description John 2013-06-20 15:44:44 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

How reproducible:
Very, always

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.

Actual results:

database failures after first shutdown and onward.

Expected results:

data access success using alternate databse and,
restoration of first datasource after database restores.

Additional info:

Also included in the attached zip file:
the server.log
the byteman script
the standalone.xml file with the xa datasource
Comment 2 Jesper Pedersen 2014-09-02 16:01:03 EDT
Martin, feel free to look at this - or close
Comment 3 Martin Simka 2014-09-25 06:43:10 EDT
see: https://bugzilla.redhat.com/show_bug.cgi?id=901221

url-delimiter isn't supported for xa-dasources and also byteman isn't supported in production.

Note You need to log in before you can comment on or make changes to this bug.