Bug 976563

Summary: xa datasource does not failover nor recover
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: John <jjfraney>
Component: JCAAssignee: Martin Simka <msimka>
Status: CLOSED WONTFIX QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-25 10:43:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
modified quickstart greeter, eap configuration, and server.log none

Description John 2013-06-20 19:44:44 UTC
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 20:01:03 UTC
Martin, feel free to look at this - or close

Comment 3 Martin Simka 2014-09-25 10:43:10 UTC
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.