This is a peculiar issue:
Our Websphere administrator made a script error in creating datasource and that created our datasource without the attribute xa=”true” in the resources.xml file. The datasource is not created using WAS UI, but created with jython script.
Here is the xml snippet from resources.xml
<resources.jdbc:JDBCProvider xmi:id="JDBCProvider_34335495940" name="Oracle JDBC Driver (XA)" description="Oracle JDBC Driver (XA)" providerType="Oracle JDBC Driver (XA)" isolatedClassLoader="false" implementationClassName="oracle.jdbc.xa.client.OracleXADataSource" >
<classpath>${ORACLE_JDBC_DRIVER_PATH}/ojdbc7.jar</classpath>
Ideally the resources.xml file should have been like this (with xa attribute at the end)
<resources.jdbc:JDBCProvider xmi:id="JDBCProvider_1518484995940" name="Oracle JDBC Driver (XA)" description="Oracle JDBC Driver (XA)" providerType="Oracle JDBC Driver (XA)" isolatedClassLoader="false" implementationClassName="oracle.jdbc.xa.client.OracleXADataSource" **xa="true"**>
<classpath>${ORACLE_JDBC_DRIVER_PATH}/ojdbc7.jar</classpath>
The application works all fine in Production without any issues.
The question is if we don’t provide the 'xa' attribute in the JDBC provider what would it understand the connection as?
The driver implementation class is: oracle.jdbc.xa.client.OracleXADataSource The connection methods are both XA getXAConnection() getXAConnection(java.lang.String userName, java.lang.String passwd)
so when WebSphere gets a connection at runtime, it should by default be an XA connection?
I have also checked and confirmed with the DBA that the database is enabled for XA.
Is the attribute xa=”true” required? If not provided, the default value becomes “false”?
Appreciate for your help!!