docs: public void associate(ExecutionContext ec, String providerId) throws WorkCompletedException
      {
          if (tc.isEntryEnabled()) Tr.entry(tc, "doAssociate", new Object[] { ec, providerId });
  
          // Check that a transaction context is present
          if (null == ec)
          {
              final WorkCompletedException wce = new WorkCompletedException("Invalid ExecutionContext", WorkException.TX_RECREATE_FAILED);
              Tr.error(tc, "WTRN0091_ASSOCIATE_FAILED", new Object[] { null, null });
              if (tc.isEntryEnabled()) Tr.exit(tc, "associate", "Invalid ExecutionContext");
              throw wce;
          }
  
          final Xid xid = ec.getXid();
          if (null == xid)
          {
              // Nothing to do
              if (tc.isEntryEnabled()) Tr.exit(tc, "associate", "Null Xid");
              return;
          }
  
          // If xid is present, it's got to be valid
          if (!TxXATerminator.isValid(xid))
          {
              final WorkCompletedException wce = new WorkCompletedException("Invalid Xid", WorkException.TX_RECREATE_FAILED);
              Tr.error(tc, "WTRN0091_ASSOCIATE_FAILED", new Object[] { ec, ec.getTransactionTimeout()});
              if (tc.isEntryEnabled()) Tr.exit(tc, "associate", "Invalid Xid");
              throw wce;
          }
  
          int status = Status.STATUS_NO_TRANSACTION;
  
          try
          {
              status = TransactionManagerFactory.getTransactionManager().getStatus();
          }
          catch(SystemException e)
          {
              final WorkCompletedException wce = new WorkCompletedException(WorkException.TX_RECREATE_FAILED, e);
              Tr.error(tc, "WTRN0091_ASSOCIATE_FAILED", new Object[] { ec, ec.getTransactionTimeout()});
              if (tc.isEntryEnabled()) Tr.exit(tc, "associate", wce);
              throw wce;
          }
  
          if (status != Status.STATUS_NO_TRANSACTION)
          {
              // There's already a global tx on this thread
              final WorkCompletedException wce = new WorkCompletedException("Already associated", WorkException.TX_RECREATE_FAILED);
              if (tc.isEntryEnabled()) Tr.exit(tc, "associate", "Already associated");
              throw wce;
          }
  
          if (providerId == null)
          {
              final WorkCompletedException wce = new WorkCompletedException("Null providerId", WorkException.TX_RECREATE_FAILED);
              Tr.error(tc, "WTRN0091_ASSOCIATE_FAILED", new Object[] { ec, ec.getTransactionTimeout()});
              if (tc.isEntryEnabled()) Tr.exit(tc, "associate", "Invalid providerId: " + providerId);
              throw wce;
          }
  
          // Check the txnTable for a previous occurance of this XID
          // If this returns null it means either that the transaction
          // is already associated or that is has already been prepared.
          // d240298 - findTxWrapper will also suspend any LTC and save in the wrapper for resuming later
          final JCATranWrapper txWrapper;
          try
          {
              txWrapper = findTxWrapper((int) ec.getTransactionTimeout(), xid, providerId);
          }
          catch(WorkCompletedException wce)
          {
              // Must be quiescing
              if (tc.isEntryEnabled()) Tr.exit(tc, "associate", "Can't create new tx while quiescing");
              throw wce;
          }
  
          if (txWrapper == null)
          {
              // Must already have had an association or been prepared
              final WorkCompletedException wce = new WorkCompletedException("Already have an association or already prepared", WorkException.TX_CONCURRENT_WORK_DISALLOWED);
              if (tc.isEntryEnabled()) Tr.exit(tc, "associate", "Already have an association or already prepared");
              throw wce;
          }
  
          // Resume the new transaction
          try
          {
          	((TranManagerSet)TransactionManagerFactory.getTransactionManager()).resume(txWrapper.getTransaction());
          }
          catch (InvalidTransactionException e)
          {
              final WorkCompletedException wce = new WorkCompletedException("resume threw InvalidTransactionException", e);
              wce.setErrorCode(WorkException.TX_RECREATE_FAILED);
              Tr.error(tc, "WTRN0091_ASSOCIATE_FAILED", new Object[] { ec, ec.getTransactionTimeout()});
              if (tc.isEntryEnabled()) Tr.exit(tc, "associate", "resume threw InvalidTransactionException");
              throw wce;
          }
          catch (IllegalStateException e)
          {
              final WorkCompletedException wce = new WorkCompletedException("resume threw IllegalStateException", e);
              wce.setErrorCode(WorkException.TX_RECREATE_FAILED);
              Tr.error(tc, "WTRN0091_ASSOCIATE_FAILED", new Object[] { ec, ec.getTransactionTimeout()});
              if (tc.isEntryEnabled()) Tr.exit(tc, "associate", "resume threw IllegalStateException");
              throw wce;
          }
  
          if (tc.isEntryEnabled()) Tr.exit(tc, "associate");
      }