docs: public Xid[] recover(int flag) throws XAException {
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.entry(this, tc, "recover", ivManagedConnection, AdapterUtil.getXAResourceRecoverFlagString(flag));
          // if the MC marked Stale, it means the user requested a purge pool with an immediate option
          // so don't allow any work to continue.  In this case, we throw XAER_RMFAIL xa error
          // which indicates that the resource manager is not available
          if (ivManagedConnection._mcStale) {
              Tr.error(tc, "INVALID_CONNECTION");
              XAException x = new XAException(XAException.XAER_RMFAIL);
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
                  Tr.exit(this, tc, "recover", new Object[] { "MC is stale throwing XAER_RMFAIL", ivManagedConnection });
              throw x;
          }
  
          Xid[] xids = null;
  
          try {
              xids = ivXaRes.recover(flag);
              if (xids == null || xids.length == 0) 
              { 
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) 
                      Tr.event(this, tc, "No oustanding transactions to recover.  Transaction state does not change.");
              } else {
                  ivStateManager.setState(WSStateManager.XA_RECOVER);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) 
                      Tr.event(this, tc, "Outstanding transactions to recover.  Transaction state is changing to " +
                                         ivManagedConnection.getTransactionStateAsString());
              }
          } catch (TransactionException te) {
              FFDCFilter.processException(te, "com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.recover", "438", this);
              Tr.warning(tc, "DSA_INTERNAL_WARNING", new Object[] { "Exception setting the transaction state to WSStateManager.XA_RECOVER from ",
                                                                   ivManagedConnection.getTransactionStateAsString(), te });
              //should never happen so just eat it
          } catch (XAException xae) {
              FFDCFilter.processException(xae, "com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.recover", "444", this);
              traceXAException(xae, currClass);
              checkXAException(xae); 
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  Tr.exit(this, tc, "recover", "Exception");
              throw xae;
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(this, tc, "recover", xids);
          return xids;
      }