-
1. Re: WildFly 13: How to create XA-DataSource?
claudio4j Jun 4, 2018 12:31 PM (in response to mayerw01)After you type the string, press enter key for each property=value, so the list of properties will be displayed under the textbox.
-
2. Re: WildFly 13: How to create XA-DataSource?
mayerw01 Jun 5, 2018 4:42 AM (in response to claudio4j)Thanks Claudio.
So what exactly should I enter as 'value' in the above example 'URL' or 'URL='?
I tried both as well under Firefox as under Chromium.
But nothing happens when I press the enter-Key
-
3. Re: WildFly 13: How to create XA-DataSource?
claudio4j Jun 5, 2018 11:47 AM (in response to mayerw01)See this short video sample Imgur: The magic of the Internet
The properties are specific to each xa datasource class implementation, for oracle they are:
DataSourceName DatabaseName ServerName URL User Password Description NetworkProtocol PortNumber ConnectionProperties MaxStatements ImplicitCachingEnabled ExplicitCachingEnabled RoleName
I think the minimum would be URL, Username, Password.
-
4. Re: WildFly 13: How to create XA-DataSource?
mayerw01 Jun 6, 2018 6:09 AM (in response to claudio4j)Unfortunately this does not work in my environment. The 'enter-key' does nothing. Neither under Chromium, nor Firefox nor Opera. I have no idea why?
-
5. Re: WildFly 13: How to create XA-DataSource?
claudio4j Jun 6, 2018 6:42 AM (in response to mayerw01)Can you check the browser console for possible error messages ?
-
6. Re: WildFly 13: How to create XA-DataSource?
andey Jun 6, 2018 7:37 AM (in response to mayerw01)You can add the xa-datasource by editing the xml.
Register the Oracle JDBC driver.
/subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)
Add the Oracle XA datasource:
xa-data-source add --name=OracleXADS --jndi-name=java:jboss/OracleXADS --driver-name=oracle --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter --stale-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker --same-rm-override=false --xa-datasource-properties={"URL"=>"jdbc:oracle:thin:@oracleHostName:1521:orcl"}
also If you try to use your approach you need to handle it as a batch:
batch
/subsystem=datasources/xa-data-source="OracleXADS":add(xa-datasource-class=oracle.jdbc.xa.client.OracleXADataSource,jndi-name="java:/OracleXADS",driver-name="mysql")
/subsystem=datasources/xa-data-source="OracleXADS"/xa-datasource-properties=ServerName:add(value="localhost")
/subsystem=datasources/xa-data-source="OracleXADS"/xa-datasource-properties=DatabaseName:add(value="mydb")
run-batch
-
7. Re: WildFly 13: How to create XA-DataSource?
mayerw01 Jun 6, 2018 9:49 AM (in response to andey)The approach via jboss-cli does not work as well.
I tried this:
batch
/subsystem=datasources/xa-data-source=OracleXATicket2RockDS:add(driver-name=oracle,jndi-name=java:jboss/datasources/OracleXATicket2RockDS,xa-datasource-class=oracle.jdbc.xa.client.OracleXADataSource)
/subsystem=datasources/xa-data-source=OracleXATicket2RockDS/xa-datasource-properties=URL:add(value="jdbc:oracle:thin:@gigabyte:1521:XE")
run-batch
The batch executed successfully
But the connection fails with the message that the Oracle-URL is invalid.
/subsystem=datasources/xa-data-source=OracleXATicket2RockDS:read-resource
{
"outcome" => "success",
"result" => {
"allocation-retry" => undefined,
....
},
"xa-datasource-properties" => {"URL" => undefined}
}
}
Finally I copied the xa-datasource from a previous WildFly version.
The connection works now but I don't think this should be the preferred approach..
-
8. Re: WildFly 13: How to create XA-DataSource?
claudio4j Jun 6, 2018 10:04 AM (in response to mayerw01)You should add the "recursive=true" option, as in :read-resource(recursive=true), because the xa properties is under a sub-resource of xa-data-source
You can also test the connection with the following operation, if there is any error, see the server log.
/subsystem=datasources/xa-data-source=OracleXATicket2RockDS:test-connection-in-pool
Regarding to web console, I tested with firefox, chrome, it worked, that is why I asked to check the browser console.
-
9. Re: WildFly 13: How to create XA-DataSource?
mayerw01 Jun 6, 2018 10:27 AM (in response to claudio4j)Connection works when I copy the xa-datasource section from the WildFly-10 configuration.
I do not see any error in the firefox log.
Did you install any add-on to get this work?
-
10. Re: WildFly 13: How to create XA-DataSource?
claudio4j Jun 6, 2018 11:18 AM (in response to mayerw01)> Did you install any add-on to get this work?
No, it should work with no extensions.
-
11. Re: WildFly 13: How to create XA-DataSource?
mayerw01 Jun 7, 2018 4:41 AM (in response to claudio4j)I've tried this also in Windows 7 (Firefox, Chrome, IE). Does not work as well.
-
12. Re: WildFly 13: How to create XA-DataSource?
claudio4j Jun 7, 2018 6:44 AM (in response to mayerw01)Can you record a video of it (with the developer console open) ? I am really curious why it doesn't work.
-
13. Re: WildFly 13: How to create XA-DataSource?
mayerw01 Jun 7, 2018 8:33 AM (in response to claudio4j)I am not sure what you expect to see.
But the enter key just does nothing
-
14. Re: WildFly 13: How to create XA-DataSource?
mayerw01 Jun 7, 2018 8:33 AM (in response to claudio4j)Hi Claudio,
I am not sure what you expect to see.But the enter key just does nothing
Regards
Wolfgang
Am Donnerstag, 7. Juni 2018, 12:44:23 CEST schrieb claudio4j:
Claudio Miranda
replied to the discussion "WildFly 13: How to create XA-DataSource?"
To view the discussion, visit:
https://developer.jboss.org/message/983213?et=watches.email.thread#983213
>
-
WILDFL-13_xa_issue.ogg 2.2 MB
-