code: protected JCATranWrapper getTxWrapper(Xid xid, boolean addAssociation) throws XAException
      {
          if (tc.isEntryEnabled()) Tr.entry(tc, "getTxWrapper", xid);
  
          final JCATranWrapper txWrapper = TxExecutionContextHandler.getTxWrapper(xid, addAssociation);
     
          if(txWrapper.getTransaction() == null)
          {
              // there was no Transaction for this XID
              if(tc.isEntryEnabled()) Tr.exit(tc, "getTxWrapper", "no transaction was found for the specified XID");
              throw new XAException(XAException.XAER_NOTA);
          }
  
          if(tc.isEntryEnabled()) Tr.exit(tc, "getTxWrapper", txWrapper);
          return txWrapper;
      }
docs: Gets the Transaction from the TxExecutionContextHandler that imported it
  
  @param xid
  @param addAssociation
  @return
  @throws XAException (XAER_NOTA) - thrown if the specified XID is invalid