If you got the below error while invoking a DB .
XAER:RMFAIL Reource manager is unavailable.
Please try below options to resolve the issue.
Firstly , update weblogic version to 10.3.6.10 to fix all the known bugs
console -> Services -> JDBC -> Data Sources -> datasource-> Configuration -> Transaction -> enable “Set XA Transaction Timeout” , and increase the timeout value for more than JTA value.
It will reflect only for the datasource not the global.
If you want to take the global JTA value considered for this application , you can increase only the JTA time out value ,and disable Set XA Transaction Timeout.
Please read what these parameters does:
JTA time out :
The transaction timeout in seconds. If the transaction is still in the “active” state after this time (counting from begin()), it is automatically rolled back. Once the transaction moves on to the prepared state, however, this timeout parameter does not apply; the transaction is retried until all the resources are committed.
Set XA Transaction Timeout:
Enables WebLogic Server to set a transaction branch timeout based on the value for XaTransactionTimeout.
When enabled, the WebLogic Server Transaction Manager calls XAResource.setTransactionTimeout() before calling XAResource.start, and passes either the XA Transaction Timeout value or the global transaction timeout.
You may want to set a transaction branch timeout if you have long-running transactions that exceed the default timeout value on the XA resource.
if you enable this parameter , needs to define the below parameter more than JTA time out :
XA Transaction Timeout :
The number of seconds to set as the transaction branch timeout.
If set, this value is passed as the transaction timeout value in the XAResource.setTransactionTimeout() call on the XA resource manager, typically the JDBC driver.
When this value is set to 0, the WebLogic Server Transaction Manager passes the global WebLogic Server transaction timeout in seconds in the method.
If set, this value should be greater than or equal to the global WebLogic Server transaction timeout.
Note: You must enable XaSetTransactionTimeout to enable setting the transaction branch timeout.