docs: private void createDestinationLocalization(
                                                 DestinationDefinition destinationDefinition,
                                                 LocalizationDefinition destinationLocalizationDefinition,
                                                 Set<String> destinationLocalizingMEs,
                                                 boolean isTemporary,
                                                 LocalTransaction transaction) throws SIResourceException, SIMPDestinationAlreadyExistsException
      {
  //    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
  //      SibTr.entry(
  //        tc,
  //        "createDestinationLocalization",
  //        new Object[] {
  //          destinationDefinition.getName(),
  //          destinationDefinition.getUUID().toString(),
  //          destinationDefinition,
  //          destinationLocalizationDefinition,
  //          destinationLocalizingMEs,
  //          new Boolean(isTemporary),
  //          transaction });
  
          boolean destinationHandlerCreated = false;
          BaseDestinationHandler destinationHandler = null;
  
          //The destination is being created on the local messaging engine.
          SIBUuid8 messagingEngineUuid = messageProcessor.getMessagingEngineUuid();
  
          checkValidLocalizationConfig(destinationDefinition,
                                       messagingEngineUuid,
                                       destinationLocalizationDefinition,
                                       destinationLocalizingMEs);
  
          //The lock on the destinationManager is taken to stop 2 threads creating the same
          //destination and also to synchronize dynamic deletes with the
          //creation of aliases.  This stops an alias destination being created that targets a
          //destination in the process of being deleted.
          synchronized (this)
          {
              //check if there are ANY with the same uuid
              DestinationTypeFilter filter = new DestinationTypeFilter();
              //Venu UUID temp
              DestinationHandler dh = destinationIndex.findByName(destinationDefinition.getName(), messageProcessor.getMessagingEngineBus(), filter);
  
              // If someone does a delete and add then it is possible the delete
              // might not have happened yet, so wait up to 5 seconds for the
              // deletion thread to finish. Then get the DH again and proceed. If
              // deletion takes more than 5 seconds this still won't work, but
              // deletion should not take 5 seconds.
              if (dh != null && dh.isToBeDeleted()) {
                  synchronized (deletionThreadLock) {
                    try {
                        if (asynchDeletionThread != null && asynchDeletionThread.isRunning()) {
                            deletionThreadLock.wait(5000);
                        }
                    } catch (InterruptedException ie) {
                      // Just ignore this, someone told us to wake up so just bail.
                      Thread.currentThread().interrupt();
                      SibTr.debug(tc, "Wait for deletion thread to complete interrupted. Continuing without further waiting");
                    }
                  }
                  dh = destinationIndex.findByName(destinationDefinition.getName(), messageProcessor.getMessagingEngineBus(), filter);
              }
  
              if (dh == null)
              {
                  // Create a new DestinationHandler, which is created locked
                  // 174199.2.3
                  destinationHandler =
                                  new BaseDestinationHandler(
                                                  destinationDefinition,
                                                  messageProcessor,
                                                  this,
                                                  transaction,
                                                  durableSubscriptions,
                                                  messageProcessor.getMessagingEngineBus());
  
                  destinationHandlerCreated = true;
                  DestinationIndex.Type type = new DestinationIndex.Type();
                  type.alias = new Boolean(destinationHandler.isAlias());
                  type.foreignDestination = new Boolean(destinationHandler.isForeign());
                  type.local = new Boolean(destinationHandler.hasLocal());
                  type.queue = new Boolean(!destinationHandler.isPubSub());
                  type.remote = new Boolean(destinationHandler.hasRemote());
                  type.state = State.CREATE_IN_PROGRESS;
                  //Venu temp UUID. setting UUID freshly
                  destinationDefinition.setUUID(new SIBUuid12());
                  destinationLocalizationDefinition.setUUID(new SIBUuid8());
                  destinationIndex.put(destinationHandler, type);
  
              }
              else
              {
                  if (dh instanceof BaseDestinationHandler) {
                      destinationHandler = (BaseDestinationHandler) dh;
                      //Venu temp UUID. setting Destination UUID from MessageStore dh
                      // LocalisationDefitnion UUID is alwasy set freshly
                      destinationDefinition.setUUID(dh.getDefinition().getUUID());
                      destinationLocalizationDefinition.setUUID(new SIBUuid8());
                  }
                  else
                  {
                      //A destination exists with this name - perhaps an alias or a
                      //foreign destination.
                      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                          SibTr.exit(
                                     tc,
                                     "createDestinationLocalization",
                                     nls_cwsik.getFormattedMessage(
                                                                   "DELIVERY_ERROR_SIRC_31", // DESTINATION_ALREADY_EXISTS_ERROR_CWSIP0045
                                                                   new Object[] { destinationDefinition.getName() },
                                                                   null));
  
                      SIMPDestinationAlreadyExistsException e = new SIMPDestinationAlreadyExistsException(
                                      nls_cwsik.getFormattedMessage(
                                                                    "DELIVERY_ERROR_SIRC_31", // DESTINATION_ALREADY_EXISTS_ERROR_CWSIP0045
                                                                    new Object[] { destinationDefinition.getName() },
                                                                    null));
  
                      e.setExceptionReason(SIRCConstants.SIRC0031_DESTINATION_ALREADY_EXISTS_ERROR);
                      e.setExceptionInserts(new String[] { destinationDefinition.getName() });
                      throw e;
                  }
              }
          }
  
          synchronized (destinationHandler)
          {
              //      // If we are corrupt, we don't want to attempt to create any points
              //      // whatsoever.
              //      if (destinationHandler.isCorrupt())
              //      {
              //        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              //          SibTr.debug(tc, "createDestinationLocalization",
              //            "Point " + destinationLocalizationDefinition.getIdentifier()
              //            + " not created since destination " + destinationHandler.getName()
              //            + " is corrupt.");
              //
              //        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              //          SibTr.exit(tc, "createDestinationLocalization");
              //
              //        return;
              //      }
  
              //If we didnt just create the destinationHandler, it is valid for this
              //create call to be made at startup or to create a local queue point
              if (!destinationHandlerCreated)
              {
                  //---199538--------------------------------------------------------------
                  //This USED to test whether the destination was reconciling
                  //and, if not, would throw an exception. This is no longer the case, as
                  //dynamic updates might cause this method to be called for a destination
                  //that already exists i.e. when localising a qPt on a previously
                  //remote destination.
                  //-----------------------------------------------------------------------
  
                  if (destinationHandler.isReconciled() && (destinationHandler.hasLocal() || destinationLocalizationDefinition == null))
                  {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                          SibTr.exit(
                                     tc,
                                     "createDestinationLocalization",
                                     nls_cwsik.getFormattedMessage(
                                                                   "DELIVERY_ERROR_SIRC_31", // DESTINATION_ALREADY_EXISTS_ERROR_CWSIP0045
                                                                   new Object[] { destinationDefinition.getName() },
                                                                   null));
  
                      SIMPDestinationAlreadyExistsException e = new SIMPDestinationAlreadyExistsException(
                                      nls_cwsik.getFormattedMessage(
                                                                    "DELIVERY_ERROR_SIRC_31", // DESTINATION_ALREADY_EXISTS_ERROR_CWSIP0045
                                                                    new Object[] { destinationDefinition.getName() },
                                                                    null));
  
                      e.setExceptionReason(SIRCConstants.SIRC0031_DESTINATION_ALREADY_EXISTS_ERROR);
                      e.setExceptionInserts(new String[] { destinationDefinition.getName() });
                      throw e;
                  }
  
                  // Only update destination handler objects with WCCM information if
                  // we have not already detected them as corrupt.
                  if (!destinationHandler.isCorruptOrIndoubt())
                  {
                      // Destination already exists.  In the new WCCM world, the
                      // create should complete succesfully, with the new destination
                      // definition replacing the existing one.
                      // We update the localization definitions before we update the
                      // actual destination definition.
  
                      if (isQueue(destinationHandler.getDestinationType()))
                      {
                          if (destinationLocalizationDefinition != null)
                          {
                              // Update the localisation definition too.
                              destinationHandler.updateLocalizationDefinition(destinationLocalizationDefinition, transaction);
                          }
                      } // eof is q
                      else if (destinationHandler.getDestinationType() == DestinationType.TOPICSPACE)
                      {
                          destinationHandler.updateLocalizationDefinition(destinationLocalizationDefinition, transaction);
                      } // eof is topicspace
  
                      destinationHandler.updateDefinition(destinationDefinition);
  
                      // Update the set of localising messaging engines for the destinationHandler
                      // Dont create remote localisations up front.  This can be done
                      // if WLM picks one of them
                      destinationHandler.updateLocalizationSet(
                                      destinationLocalizingMEs);
  
                      // Alert the lookups object to handle the re-definition
                      DestinationIndex.Type type = new DestinationIndex.Type();
                      type.alias = new Boolean(destinationHandler.isAlias());
                      type.foreignDestination = new Boolean(destinationHandler.isForeign());
                      type.local = new Boolean(destinationHandler.hasLocal());
                      type.queue = new Boolean(!destinationHandler.isPubSub());
                      type.remote = new Boolean(destinationHandler.hasRemote());
                      type.state = destinationIndex.getState(destinationHandler);
                      destinationIndex.setType(destinationHandler, type);
                      destinationIndex.create(destinationHandler);
  
                      //Show that the destination is now reconciled
                      destinationHandler.setReconciled();
  
                      if (destinationHandler.getHasReconciledStreamsToBeDeleted())
                      {
                          //defect 259817
                          //there was some unfinished cleanup from before the ME previously shutdown
                          //that we now need to take care of.
                          destinationIndex.cleanup(destinationHandler);
                      }
                  }
              }
              else // we did just create the destinationHandler.
              {
                  if (isQueue(destinationHandler.getDestinationType()))
                  {
                      if (destinationLocalizationDefinition != null)
                      {
                          // Create a new point to point localisation
                          destinationHandler.addNewPtoPLocalization(
                                                                    false,
                                                                    transaction,
                                                                    messagingEngineUuid,
                                                                    destinationLocalizationDefinition,
                                                                    true);
                      }
                  } // eof is q
                  else if (destinationHandler.getDestinationType() == DestinationType.TOPICSPACE)
                  {
                      destinationHandler.addPubSubLocalisation(destinationLocalizationDefinition);
                  } // eof is topicspace
  
                  // Update the set of localising messaging engines for the destinationHandler
                  // Dont create remote localisations up front.  This can be done
                  // if WLM picks one of them
                  destinationHandler.updateLocalizationSet(
                                  destinationLocalizingMEs);
  
                  // Put the newly created destination handler into the indexes
                  destinationIndex.setLocalizationFlags(destinationHandler);
  
              } // eof we did just create the DH
          } // end of synchronization
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(tc, "createDestinationLocalization");
      }