docs: public static JCATranWrapper getTxWrapper(Xid xid, boolean addAssociation) throws XAException
      {
          if (tc.isEntryEnabled()) Tr.entry(tc, "getTxWrapper", new Object[] { xid, addAssociation});
  
          final ByteArray key = new ByteArray(xid.getGlobalTransactionId());
  
          final JCATranWrapper txWrapper;
  
          synchronized (txnTable)
          {
              txWrapper = txnTable.get(key);
  
              if (txWrapper != null)
              {
                  if (addAssociation)
                  {
                      if (!txWrapper.hasAssociation())
                      {
                          txWrapper.addAssociation();
                      }
                      else
                      {
                          // Already associated
                          if (tc.isEntryEnabled()) Tr.exit(tc, "getTxWrapper", "throwing XAER_PROTO");
                          throw new XAException(XAException.XAER_PROTO);
                      }
                  }
              }
              else
              {
                  if (tc.isEntryEnabled()) Tr.exit(tc, "getTxWrapper", "throwing XAER_NOTA");
                  throw new XAException(XAException.XAER_NOTA);
              }
          }
  
          if (tc.isEntryEnabled()) Tr.exit(tc, "getTxWrapper", txWrapper);
          return txWrapper;
      }