-
1. Re: Creating XA Datasource from the CLI fails
wdfink Dec 20, 2013 3:10 AM (in response to mylos78)That sounds like a bug to me.
the xa-datasource-property is a sub-element of xa-datasource.
A xa-datasource look like this:
<xa-datasource jndi-name="java:/MySqlDSXA" pool-name="MySqlDSXA">
<driver>mysql</driver>
<xa-datasource-property name="ServerName">localhost</xa-datasource-property>
<xa-datasource-property name="DatabaseName">mydb</xa-datasource-property>
<security>
<user-name>admin</user-name>
<password>admin</password>
</security>
</xa-datasource>
which WildFly version do you use? Is it the latest?
-
2. Re: Creating XA Datasource from the CLI fails
mylos78 Dec 20, 2013 3:29 AM (in response to mylos78)Hi , thanks for your reply. Well the above test was run against the Beta1 release, but I remember hitting the same issue on the Beta2 Snapshot.....
Any workaround ?
Thanks
Mylos
-
3. Re: Creating XA Datasource from the CLI fails
wdfink Dec 20, 2013 5:17 AM (in response to mylos78)You can add the xa-datasource by editing the xml.
Another option is to use the operation in CLI
xa-data-source add --name=MySqlDSXA --jndi-name="java:/test" --driver-name=mysql --xa-datasource-class=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource --xa-datasource-properties=[{ServerName=localhost}]
-
4. Re: Creating XA Datasource from the CLI fails
wdfink Dec 20, 2013 5:29 AM (in response to mylos78)If you try to use your approach you need to handle it as a batch
batch
/subsystem=datasources/xa-data-source="MySqlDSXA":add(xa-datasource-class=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource,jndi-name="java:/MySqlDSXA",driver-name="mysql")
/subsystem=datasources/xa-data-source="MySqlDSXA"/xa-datasource-properties=ServerName:add(value="localhost")
/subsystem=datasources/xa-data-source="MySqlDSXA"/xa-datasource-properties=DatabaseName:add(value="mydb")
run-batch
In that case it works