<p>Register the destination vith WLM via TRM</p>

System destinations and Temporary destinations are not registered
with WLM.  The destinations themselves have their own addressing
mechanisms.
332292
void registerDestination()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "registerDestination");

    //Only register the destination once its been defined to WLM
    if (_mqLinkManager.isDefined(getUuid()))
    {
      if ((hasLocal()) && (!_registeredInWLM))
      {
        try
        {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.debug(tc, "Register MQLink: " + getUuid() + ", with linkManager");           
          _linkManager.register(getUuid());
          _registeredInWLM = true;
        }
        catch (LinkException e)
        {
          //Error during create of the link.  Trace an FFST.  If we cant 
          //advertise the link, other ME's wont be able to send to it
          FFDCFilter.processException(
            e,
            "com.ibm.ws.sib.processor.impl.MQLinkHandler.registerDestination",
            "1:724:1.71",
            this);
    
          SibTr.exception(tc, e);
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
            SibTr.exit(tc, "registerDestination", e);
        }
      }
    }
        
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "registerDestination");  
      
    return;
  }
104091
static boolean isServerOrHostController(ImmutableManagementResourceRegistration resourceRegistration) {
        return resourceRegistration.getProcessType().isServer() || !ModelDescriptionConstants.PROFILE.equals(resourceRegistration.getPathAddress().getElement(0).getKey());
    }
1292305
public void dereferenceControllable()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "dereferenceControllable");

    destinationManager = null;
    aliasDest = null;
    index = null;
    mpControl = null;
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "dereferenceControllable");    
  }
27014
@Override
    public void registerControlAdapters()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "registerControlAdapters");

        //register the local queue point/publication point as appropriate
        _protoRealization.registerControlAdapters();

        // If _remoteQueuePoints not null indicates Queue destination
        SIMPIterator itr = null;
        if (_remoteQueuePoints != null)
        {
            //register the xmit queue points
            itr = _remoteQueuePoints.iterator();
            while (itr.hasNext())
            {
                ControlAdapter remote = (ControlAdapter) itr.next();
                remote.registerControlAdapterAsMBean();
            }
            itr.finished();
        }

        if (isLink())
        {
            //register the xmit queue points
            Iterator it = _localisationManager.getXmitQueueIterator();
            while (it.hasNext())
            {
                ControlAdapter remote = ((PtoPXmitMsgsItemStream) it.next()).getControlAdapter();
                remote.registerControlAdapterAsMBean();
            }
        }

        //We're not registering the BDH's control handler at this time
        // But we register the link as a SIBLink MBean
        if (isLink())
            getControlAdapter().registerControlAdapterAsMBean();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "registerControlAdapters");
    }
624906
protected void setVirtualHostMgr(DynamicVirtualHostManager vhostMgr) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(this, tc, "setVirtualHostMgr : DynamicVirtualHost set : " + vhostMgr.toString());  
        dynVhostMgr = vhostMgr;
    }
971670
public void registerWorkManager(WorkManager wm)
   {
      if (wm != null)
      {
         if (wm.getName() == null || wm.getName().trim().equals(""))
            throw new IllegalArgumentException("The name of WorkManager is invalid: " + wm);

         if (trace)
            log.tracef("Registering WorkManager: %s", wm);

         if (!workmanagers.keySet().contains(wm.getName()))
         {
            workmanagers.put(wm.getName(), wm);

            // Replay events for distributed work managers
            if (wm instanceof DistributedWorkManager)
            {
               WorkManagerEventQueue wmeq = WorkManagerEventQueue.getInstance();
               List<WorkManagerEvent> events = wmeq.getEvents(wm.getName());

               if (!events.isEmpty())
               {
                  if (trace)
                     log.tracef("%s: Events=%s", wm.getName(), events);

                  for (WorkManagerEvent event : events)
                  {
                     if (event.getType() == WorkManagerEvent.TYPE_JOIN)
                     {
                        DistributedWorkManager dwm = resolveDistributedWorkManager(event.getAddress());

                        if (dwm != null)
                        {
                           Collection<NotificationListener> copy =
                              new ArrayList<>(dwm.getNotificationListeners());
                           for (NotificationListener nl : copy)
                           {
                              nl.join(event.getAddress());
                           }
                        }
                     }
                     else if (event.getType() == WorkManagerEvent.TYPE_LEAVE)
                     {
                        DistributedWorkManager dwm = 
                           (DistributedWorkManager)activeWorkmanagers.get(event.getAddress().getWorkManagerId());

                        if (dwm != null)
                        {
                           Collection<NotificationListener> copy =
                              new ArrayList<NotificationListener>(dwm.getNotificationListeners());
                           for (NotificationListener nl : copy)
                           {
                              nl.leave(event.getAddress());
                           }
                        }

                        removeWorkManager(event.getAddress().getWorkManagerId());
                     }
                     else if (event.getType() == WorkManagerEvent.TYPE_UPDATE_SHORT_RUNNING)
                     {
                        DistributedWorkManager dwm = 
                           (DistributedWorkManager)activeWorkmanagers.get(event.getAddress().getWorkManagerId());

                        if (dwm != null)
                        {
                           Collection<NotificationListener> copy =
                              new ArrayList<NotificationListener>(dwm.getNotificationListeners());
                           for (NotificationListener nl : copy)
                           {
                              nl.updateShortRunningFree(event.getAddress(), event.getValue());
                           }
                        }
                     }
                     else if (event.getType() == WorkManagerEvent.TYPE_UPDATE_LONG_RUNNING)
                     {
                        DistributedWorkManager dwm = 
                           (DistributedWorkManager)activeWorkmanagers.get(event.getAddress().getWorkManagerId());

                        if (dwm != null)
                        {
                           Collection<NotificationListener> copy =
                              new ArrayList<NotificationListener>(dwm.getNotificationListeners());
                           for (NotificationListener nl : copy)
                           {
                              nl.updateLongRunningFree(event.getAddress(), event.getValue());
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
500254
public synchronized MessageRouterConfigListenerImpl register(BundleContext bundleContext) {
        if (serviceRegistration != null) {
            return this; // Already registered.
        }

        Dictionary<String, Object> props = new Hashtable<String, Object>(1);
        props.put(Constants.SERVICE_VENDOR, "IBM");

        // register the ManagedService that will handle the config
        serviceRegistration = bundleContext.registerService(MessageRouterConfigListener.class, this, props);
        return this;
    }
390172
public void destinationLocationChange (SIBUuid12 destId, Set additions, Set deletions, Capability capability)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "destinationLocationChange",
        new Object[]{destId, additions, deletions, capability});

    BaseDestinationHandler destinationHandler =
      (BaseDestinationHandler) _destinationManager.getDestinationInternal(destId, false);

    if (destinationHandler != null)
    {

      // Check if the localisation should be deleted
      Set localitySet = getDestinationLocalitySet(destinationHandler, capability);
      
      synchronized(destinationHandler)
      {
        // d526250 - If a remote destination is deleted then its ME stopped we might
        // get a trm notification in. Meanwhile, admin has told us to delete the dest
        // already. If we dont do the following we end up performing cleanup on a 
        // dest that no longer exists and we get nullpointers.
        if (!destinationHandler.isToBeDeleted())
        {
          // Process deletions from the WLM set for the destination
          // (No requirement to react to additions)
          Iterator i = deletions.iterator();
  
          while(i.hasNext())
          {
            SIBUuid8 meUuid = (SIBUuid8) i.next();
  
            //No point reacting to our own ME uuid
            if (!(meUuid.equals(_messageProcessor.getMessagingEngineUuid())))
            {
              PtoPMessageItemStream ptoPMessageItemStream;
  
                ptoPMessageItemStream = destinationHandler.getXmitQueuePoint(meUuid);
  
              // Dont touch a localisation that doesnt exist
              if (ptoPMessageItemStream != null)
              {
                if ((localitySet == null) || !localitySet.contains(meUuid.toString()))
                {
                  // The localisation is not known in WCCM or WLM, so mark it for deletion
                  cleanupDestination(ptoPMessageItemStream, 
                      destinationHandler,
                      meUuid,
                      capability);
                }
              }
            }
          }

          if (capability != Capability.GET)
          {
            // Reallocate the transmitQs to evenly spread messages
            destinationHandler.requestReallocation();
          }
        }
      }
    }
    
    // Iterate over the registered MP listeners and alert them to the location change
    for (int i = 0; i < _destinationChangeListeners.size(); i++)
    {
      MPDestinationChangeListener listener = _destinationChangeListeners.get(i);
      if (listener != null)
        listener.destinationLocationChange(destId, additions, deletions, capability);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "destinationLocationChange");

    return;
  }
207172
protected void registerForPostCommit(MultiMEProxyHandler proxyHandler,
                                       DestinationHandler destination, 
                                       PubSubOutputHandler handler,
                                       Neighbour neighbour)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "registerForPostCommit", 
        new Object[] { proxyHandler, destination, handler, neighbour });

    _proxyHandler = proxyHandler;
    _destination = destination;
    _handler = handler;
    _neighbour = neighbour;
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "registerForPostCommit");
  }
1325917
public void setRoutingDestination(JsDestinationAddress value) {
    if (value != null) {
      jmo.setField(ControlAccess.ROUTINGDESTINATION_VALUE_NAME, value.getDestinationName());
      if (value.getME() != null) {
        jmo.setField(ControlAccess.ROUTINGDESTINATION_VALUE_MEID, value.getME().toByteArray());
      }
      else {
        jmo.setField(ControlAccess.ROUTINGDESTINATION_VALUE_MEID, null);
      }
      jmo.setField(ControlAccess.ROUTINGDESTINATION_VALUE_BUSNAME, value.getBusName());
    }
    else {
      jmo.setChoiceField(ControlAccess.ROUTINGDESTINATION, ControlAccess.IS_ROUTINGDESTINATION_EMPTY);
    }
  }
188391
public void setForeignBusSendAllowed(boolean sendAllowed)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "setForeignBusSendAllowed", Boolean.valueOf(sendAllowed));
    }
    
    // Set the flag on this handler
    _sendAllowedOnTargetForeignBus = Boolean.valueOf(sendAllowed);
    
    // Tell any destinations that target this destination to refresh their
    // sendAllowed setting
    if (aliasesThatTargetThisDest != null)
    {
      synchronized(aliasesThatTargetThisDest)
      {
        Iterator i = aliasesThatTargetThisDest.iterator();
        while (i.hasNext())
        {
          AbstractAliasDestinationHandler abstractAliasDestinationHandler = 
            (AbstractAliasDestinationHandler) i.next();
          abstractAliasDestinationHandler.setForeignBusSendAllowed(sendAllowed);
        }
      }
    }    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.exit(tc, "setForeignBusSendAllowed");
    }
  }
889394
def program_rtr_default_gw(self, tenant_id, rout_id, gw):
        
        args = ['route', 'add', 'default', 'gw', gw]
        ret = self.program_rtr(args, rout_id)
        if not ret:
            LOG.error("Program router returned error for %s", rout_id)
            return False
        return True
1085877
final void verifyExistingDestination() {
        PartitionReplica destination = migrationInfo.getDestination();
        Member target = getNodeEngine().getClusterService().getMember(destination.address(), destination.uuid());
        if (target == null) {
            throw new TargetNotMemberException("Destination of migration could not be found! => " + toString());
        }
    }
328374
public synchronized void registerJmxIfRequired() {
        referenceCount++;
        if(isRegistered == false) {
            String domain = JmxUtils.getPackageName(this.getClass());
            this.jmxObjectName = JmxUtils.createObjectName(domain, this.name);
            JmxUtils.registerMbean(this, this.jmxObjectName);
            isRegistered = true;
        }
    }
245526
public boolean destinationExists(String destinationName, String busName) throws SIMPNullParameterException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "destinationExists", new Object[] { destinationName, busName });

        // Check that the destination name is not null.  If it is, throw a
        // SIMPNullParameterException
        if (destinationName == null)
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(
                           tc,
                           "destinationExists",
                           "Destination name null");

            throw new SIMPNullParameterException(
                            nls_cwsik.getFormattedMessage(
                                                          "MISSING_PARAM_ERROR_CWSIP0044",
                                                          new Object[] { messageProcessor.getMessagingEngineName() }, null));

        }

        // Now look for the destination in the hash table
        boolean exists = destinationIndex.containsKey(busName, destinationName);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "destinationExists", new Boolean(exists));

        return exists;

    }
1271731
Context registerContext(final String path, final List<String> virtualHosts) {
        VHostMapping host = null;
        for (final VHostMapping vhost : vHosts) {
            if (virtualHosts.equals(vhost.getAliases())) {
                host = vhost;
                break;
            }
        }
        if (host == null) {
            host = new VHostMapping(this, virtualHosts);
            vHosts.add(host);
        }
        final Context context = new Context(path, host, this);
        contexts.add(context);
        return context;
    }
1347431
@Override
    public void registerDestination(boolean hasLocal,
                                    boolean isDeleted)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc,
                        "registerDestination",
                        new Object[] {
                                      Boolean.valueOf(hasLocal),
                                      Boolean.valueOf(isDeleted),
                                      this });
        // Dont register temporary destinations or system destinations.
        if (!_baseDestinationHandler.isTemporary() && !_baseDestinationHandler.isSystem())
        {
            if (_pToPLocalMsgsItemStream != null && !(_pToPLocalMsgsItemStream instanceof MQLinkMessageItemStream))
                _localisationManager.registerDestination();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "registerDestination");
    }