private boolean createMQLinkMPResources(
                                            MQLinkHandler mqLinkHandler,
                                            MQLinkDefinition mqld,
                                            LocalizationDefinition linkLocalizationDefinition,
                                            VirtualLinkDefinition virtualLinkDefinition,
                                            Set<String> linkLocalizingMEs,
                                            LocalTransaction transaction,
                                            boolean linkCreated) throws SIResourceException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(
                        tc,
                        "createMQLinkMPResources",
                        new Object[] { mqLinkHandler,
                                      mqld,
                                      linkLocalizationDefinition,
                                      virtualLinkDefinition,
                                      linkLocalizingMEs,
                                      transaction,
                                      new Boolean(linkCreated) });

        boolean engineResourcesRequired = false;

        //For MQLinks, we want the QueueHigh messages to be the same as for
        //transmit queues.
        linkLocalizationDefinition.setDestinationHighMsgs(messageProcessor.getHighMessageThreshold());
        linkLocalizationDefinition.setDestinationLowMsgs((messageProcessor.getHighMessageThreshold() * 8) / 10);

        //If we didnt just create the linkHandler and the one that already
        //existed is for a different UUID, or there is already a localisation for
        //the linkHandler on this ME, then this could be a problem and further
        //tests are required.
        if (!linkCreated)
        {
            /*
             * 182456.6
             * For the move to WCCM, createDestination can be called for
             * destinations in WCCM that the message processor already
             * holds state about. This is ok as long as the destination has
             * not already been reconciled.
             */
//      if (mqLinkHandler.isReconciled())
//      {
//        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
//          SibTr.exit(
//            tc,
//            "createMQLinkMPResources",
//            "Link already exists");
//
//        throw new SIMPDestinationAlreadyExistsException(
//          nls.getFormattedMessage(
//            "LINK_ALREADY_EXISTS_ERROR_CWSIP0043",
//            new Object[] { virtualLinkDefinition.getName(),
//                           messageProcessor.getMessagingEngineName()},
//            null));
//      }

            // Handle uuid changes
            if (!(mqld.getUuid().equals(mqLinkHandler.getMqLinkUuid())))
            {
                // Need to set the toBeDeleted flag in the "old" handler
                // and set up a new handler
                deleteRecreateMQLinkHandler(
                                            mqld,
                                            mqLinkHandler,
                                            virtualLinkDefinition,
                                            linkLocalizationDefinition,
                                            transaction);

            }
            else
            {
                /*
                 * Link already exists. In the new WCCM world, the
                 * create should complete succesfully, with the new link
                 * definition replacing the existing one.
                 */
                mqLinkHandler.updateLinkDefinition(virtualLinkDefinition, transaction);

                // Flag that we need to tell the MQLink component to create its MQLink infrastructure.
                engineResourcesRequired = true;

                if (linkLocalizingMEs == null)
                {
                    linkLocalizingMEs = new HashSet<String>();
                    linkLocalizingMEs.add(messageProcessor.getMessagingEngineUuid().toString());
                }

                //        Alert the lookups object to handle the re-definition
                linkIndex.setLocalizationFlags(mqLinkHandler, true, false);

                //MQLinks have a real localisation associated with them, so it can
                //be updated here
                mqLinkHandler.updateLocalizationDefinition(linkLocalizationDefinition, transaction);

                // Alert the lookups object to handle the re-definition
                linkIndex.create(mqLinkHandler);

            }
        }
        else // we did just create the linkHandler.
        {
            //First add the localization for the MQlink
            mqLinkHandler.addNewMQLinkLocalisation(
                                                   transaction,
                                                   messageProcessor.getMessagingEngineUuid(),
                                                   linkLocalizationDefinition);

            // Flag that we need to tell the MQLink component to create its MQLink infrastructure.
            engineResourcesRequired = true;

        } // eof we did just create the linkHandler

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

        return engineResourcesRequired;
    }
private boolean createMQLinkMPResources ( MQLinkHandler mqLinkHandler , MQLinkDefinition mqld , LocalizationDefinition linkLocalizationDefinition , VirtualLinkDefinition virtualLinkDefinition , Set < String > linkLocalizingMEs , LocalTransaction transaction , boolean linkCreated ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createMQLinkMPResources" , new Object [ ] { mqLinkHandler , mqld , linkLocalizationDefinition , virtualLinkDefinition , linkLocalizingMEs , transaction , new Boolean ( linkCreated ) } ) ; boolean engineResourcesRequired = false ; linkLocalizationDefinition . setDestinationHighMsgs ( messageProcessor . getHighMessageThreshold ( ) ) ; linkLocalizationDefinition . setDestinationLowMsgs ( ( messageProcessor . getHighMessageThreshold ( ) * 8 ) / 10 ) ; if ( ! linkCreated ) { if ( ! ( mqld . getUuid ( ) . equals ( mqLinkHandler . getMqLinkUuid ( ) ) ) ) { deleteRecreateMQLinkHandler ( mqld , mqLinkHandler , virtualLinkDefinition , linkLocalizationDefinition , transaction ) ; } else { mqLinkHandler . updateLinkDefinition ( virtualLinkDefinition , transaction ) ; engineResourcesRequired = true ; if ( linkLocalizingMEs == null ) { linkLocalizingMEs = new HashSet < String > ( ) ; linkLocalizingMEs . add ( messageProcessor . getMessagingEngineUuid ( ) . toString ( ) ) ; } linkIndex . setLocalizationFlags ( mqLinkHandler , true , false ) ; mqLinkHandler . updateLocalizationDefinition ( linkLocalizationDefinition , transaction ) ; linkIndex . create ( mqLinkHandler ) ; } } else { mqLinkHandler . addNewMQLinkLocalisation ( transaction , messageProcessor . getMessagingEngineUuid ( ) , linkLocalizationDefinition ) ; engineResourcesRequired = true ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createMQLinkMPResources" , new Boolean ( engineResourcesRequired ) ) ; return engineResourcesRequired ; }
<p>This method is used to create the MQLink resources for a link that is localised on this ME.</p>