Bug 1312405 - EAP7 - unable to create xa datasource - At least one xa-datasource-property is required
EAP7 - unable to create xa datasource - At least one xa-datasource-property i...
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 7 (Show other bugs)
JON 3.3.5
Unspecified Unspecified
high Severity high
: DR01
: One-off release
Assigned To: Thomas Segismont
Hayk Hovsepyan
: Triaged
Depends On:
Blocks: 1314853
  Show dependency treegraph
 
Reported: 2016-02-26 10:59 EST by Filip Brychta
Modified: 2016-06-06 14:57 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-06 14:57:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Filip Brychta 2016-02-26 10:59:52 EST
Description of problem:
Creation of new xa datasource fails with WFLYJCA0069: At least one xa-datasource-property is required for an xa-datasource, rolled-back=true

If there is any new required property the JON UI should reflect that.


Version-Release number of selected component (if applicable):
JON3.3.5 with eap plugin pack update03-DR01

How reproducible:
Always

Steps to Reproduce:
1. go to subsystem->Connectors->datasource->Child resources->Create child->xa datasource
2. fill all required properties: {jndi-name:'java:jboss/datasources/testDatasourceXA',driver-name:'h2',xa-datasource-class:'org.h2.jdbcx.JdbcDataSource',*2:[{key:'url',value:'jdbc:h2:mem:testDatasourceXA;DB_CLOSE_DELAY=-1'}


Actual results:
It fails with WFLYJCA0069: At least one xa-datasource-property is required for an xa-datasource, rolled-back=true

Expected results:
All required properties should be marked as required and attempts to submit without all required properties should fail informing user what is missing.

Additional info:
Properties from step 2 work with EAP6 correctly
Comment 1 Michael Burman 2016-02-29 10:15:01 EST
Is adding XA datasource really working for EAP6 either? This is what we send to the server:

{"operation":"add","address":[{"subsystem":"datasources"},{"xa-data-source":"XATest"}],"driver-name":"h2","flush-strategy":"FailingConnectionOnly","*2":[{"value":"jdbc:h2:mem:testDatasourceXA;DB_CLOSE_DELAY=-1","key":"url"}],"xa-datasource-class":"org.h2.jdbcx.JdbcDataSource","jndi-name":"ava:jboss/datasources/testDatasourceXA"}

Note the "*2" instead of xa-datasource-properties. We don't send that info correctly to EAP6 either. Hmm.
Comment 2 Filip Brychta 2016-02-29 11:08:54 EST
Yes it is working for EAP6. There is automation for both UI and CLI.
I think that tsegismont will be able to explain "*2"
Comment 3 Michael Burman 2016-03-02 08:45:08 EST
The problem itself is in DatasourcesComponent doing this:

        CreateResourceDelegate delegate = new CreateResourceDelegate(configDef, getASConnection(), getAddress());
        report = delegate.createResource(report);

There's later on the fix for this "*2" property, but this one misses it.
Comment 4 Thomas Segismont 2016-03-11 10:51:13 EST
Pull request sent https://github.com/rhq-project/rhq/pull/215
Comment 5 Thomas Segismont 2016-03-11 10:51:29 EST
(In reply to Thomas Segismont from comment #4)
> Pull request sent https://github.com/rhq-project/rhq/pull/215

EAP7, unlike EAP6, wants xa-datasource-properties to be part of the creation operation.
Same applies to regular datasource.
Comment 6 Thomas Segismont 2016-03-14 10:15:34 EDT
Merged in master

commit e07852abc67546365c1fee94cc3ac9f8369a7a68
Merge: 9066941 f6ae2ef
Author: Michael Burman <yak@iki.fi>
Date:   Mon Mar 14 12:07:39 2016 +0200
Comment 9 Hayk Hovsepyan 2016-03-23 06:58:34 EDT
Verified on jon-plugin-pack-eap-3.3.0.GA-update-03-DR02

XA and Non-XA datasources are able to create.

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