[wildfly-dev] using <xa-datasource> and <data-source> with same driver and other related questions
John Mazzitelli
mazz at redhat.com
Fri May 5 13:52:16 EDT 2017
I have a stupid question and two not-so-stupid questions.
1. I think I know the answer but I really just need confirmation.
Suppose I have this defined in standalone.xml:
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
<driver>
Notice it defines the XA datasource class.
I can share this with both a non-XA <data-source> and a XA <xa-data-source>, correct? So this is OK:
<datasource jndi-name="java:/foo">
<driver>h2</driver>
<datasource>
<xa-datasource jndi-name="java:/bar">
<driver>h2</driver>
<xa-datasource>
That's the stupid question.
2. Here a second question - what is the purpose of both "driver-xa-datasource-class-name" and "xa-datasource-class". The weird thing is the XML in standalone.xml uses "xa-datasource-class" but that seems to be the value of the attribute "driver-xa-datasource-class-name" - what is this xa-datasource-class ATTRIBUTE?
The docs are not clear here: https://wildscribe.github.io/Wildfly/10.0.0.Final/subsystem/datasources/jdbc-driver/index.html
where it says:
* driver-xa-datasource-class-name The fully qualified class name of the javax.sql.XADataSource implementation module-slot The slot of the module from which the driver was loaded, if it was loaded from the module path profile Domain Profile in which driver is defined. Null in case of standalone server
* xa-datasource-class XA datasource class
3. Third question - what is this "jdbc-compliant" attribute used for? The docs don't indicate what it would actually be used for:
* jdbc-compliant - Whether or not the driver is JDBC compliant
If I am defining a JDBC driver, wouldn't you think it is JDBC compliant? :-)
Thanks.
More information about the wildfly-dev
mailing list