docs: public XAResource getXAResource() throws ResourceException {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
  
          if (isTraceOn && tc.isEntryEnabled()) 
              Tr.entry(this, tc, "getXAResource");
  
          if (xares != null) {
              if (isTraceOn && tc.isEventEnabled()) 
                  Tr.event(this, tc, "Returning existing XAResource", xares);
          } else if (is2Phase) {
              //this is a JTAEnabled dataSource, so get a real XaResource object
              try {
                  XAResource xa = ((javax.sql.XAConnection) poolConn).getXAResource();
                  xares = new WSRdbXaResourceImpl(xa, this);
  
              } catch (SQLException se) {
                  FFDCFilter.processException(se, "com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.getXAResource", "1638", this);
                  if (isTraceOn && tc.isEntryEnabled()) 
                      Tr.exit(this, tc, "getXAResource", se);
                  throw AdapterUtil.translateSQLException(se, this, true, getClass());
              }
          } else {
              //this is not a JTAEnabled dataSource, so can't get an xaResource
              //instead get a OnePhaseXAResource
              xares = new WSRdbOnePhaseXaResourceImpl(sqlConn, this);
          }
  
          if (isTraceOn && tc.isEntryEnabled()) 
              Tr.exit(this, tc, "getXAResource");
          return xares;
  
      }