code: void refreshCachedAutoCommit()  {
          try {
              boolean autoCommit = sqlConn.getAutoCommit();
              if (currentAutoCommit != autoCommit) {
                  currentAutoCommit = autoCommit;
                  for (int i = 0; i < numHandlesInUse; i++)
                      handlesInUse[i].setCurrentAutoCommit(autoCommit, key);
              }
          } catch (SQLException x) {
              // Mark the connection stale and close all handles if we cannot accurately determine the autocommit value.
              processConnectionErrorOccurredEvent(null, x);
          }
      }
docs: After XAResource.end, Oracle resets the autocommit value to whatever it was before the transaction
  instead of leaving it as the value that the application set during the transaction.
  Refresh our cached copy of the autocommit value to be consistent with the JDBC driver's behavior.