void
  Component_exec_i::check_domain_id (DDSPublisher * pub)
  {
#if (CIAO_DDS4CCM_NDDS == 1)
    DDSDomainParticipant * part = pub->get_participant ();
    if (part->get_domain_id () != DOMAIN_ID_IN_DP)
      {
        ACE_ERROR ((LM_ERROR, "Component_exec_i::check_domain_id - "
                              "ERROR: Domain ID not set properly: "
                              "expected <%u> - retrieved <%u>\n",
                              DOMAIN_ID_IN_DP,
                              part->get_domain_id ()));
      }
    else
      {
        ACE_DEBUG ((LM_DEBUG, "Component_exec_i::check_domain_id - "
                              "Domain ID set properly.\n"));
      }
#else
    ACE_UNUSED_ARG (pub);
#endif
  }