protected TransactionResult handleMessageGroupCustom(
      SolicitedMessageGroupImpl messageGroup,
      TransactionMessageImpl originalMessage,
      TransactionResult txResult) {

    LOGGER.info(messageGroup.getMessageId(), "Get into handleMessageGroupCustom");
    // if the result is null, there is no error/exception in the response
    // message
    if (txResult == null) txResult = new TransactionResult();

    TransactionResult result = txResult;

    NoMatchHeaderDataMessageImpl headerMessage =
        (NoMatchHeaderDataMessageImpl) messageGroup.getHeaderMessage();

    try {

      init();
      boolean isSystem = isResponseOf10YearHistoryCheckSystem(originalMessage);

      if (headerMessage != null
          && headerMessage.getMessageType().equals(MessageCodeConstants.MESSAGE_TYPE_HB)) {

        result =
            historyCheckBusiness.saveMessgeGroupFor10YearHistoryCheck(
                messageGroup, result, originalMessage, isSystem);

      } else {
        result =
            historyCheckBusiness.saveMessgeGroupFor10YearHistoryCheck(
                messageGroup, result, originalMessage, isSystem);
        result.setOperation(TransactionResult.OPERATION_UPDATE);
        result.setTransactionStatus(MessageCodeConstants.TX_STATUS_FAILED);
      }

    } catch (Exception e) {
      LOGGER.error(messageGroup.getMessageId(), e);
      MessageUtilities.prepareFailedTransactionResult(
          result, null, false, MessageFieldsErrorIDConstants.PDPS_INFO_UPDATE_FAILURE);
    }

    return result;
  }
 public synchronized void addMessage(MessageBaseImpl message) {
   super.addMessage(message);
   if (!isPersisted() && "CG".equals(message.getMessageType())) {
     try {
       IMessageBusiness dbMessageBusiness = MessageDAOFactory.getDBMessageBusiness();
       updateTransaction(MessageCodeConstants.CSOR_IN_PROGRESS);
       TransactionMessageImpl txMessage =
           dbMessageBusiness.loadTransactionMessage(
               messageId, MessageCodeConstants.OUTGOING, false);
       ApplicantBusiness appBusiness =
           (ApplicantBusiness) MessageDAOFactory.getAppBeanInstance("applicantBusiness");
       Applicant applicant = appBusiness.findBaseAppById(txMessage.getPersonId());
       applicant.setCsorIndicator(new Boolean(true));
       appBusiness.saveOrUpdate(applicant);
     } catch (HibernateException he) {
       AAMVALogger.error(message.getMessageId(), this.getClass(), he.getMessage());
       throw he;
     }
   }
 }