class JtaBeforeCompletionMessage extends TXMessage {

  @Override
  protected boolean operateOnTx(TXId txId, ClusterDistributionManager dm) {
    InternalCache cache = dm.getCache();
    TXManagerImpl txMgr = cache.getTXMgr();
    if (logger.isDebugEnabled()) {
      logger.debug("JTA: Calling beforeCompletion for :{}", txId);
    }
    // Check if jta has been completed, possible due to tx failover.
    // No need to execute beforeCompletion if already completed.
    if (txMgr.isHostedTxRecentlyCompleted(txId)) {
      return true;
    }

    txMgr.getTXState().beforeCompletion();
    return true;
  }

  public  JtaBeforeCompletionMessage();
  public  JtaBeforeCompletionMessage(int txUniqId, InternalDistributedMember onBehalfOfClientMember,
      ReplyProcessor21 processor);

}