         if (ObjectUtil.compare(channelIdsA, channelIdsB) != 0)
             throw new ArgumentError("Specified destinations are not channel consistent");
     }
-    
+
     /**
      *  Returns a shared instance of the configured Channel.
      *
      *  @param id The id of the desired Channel.
-     * 
+     *
      *  @param clustered True if the Channel will be used in a clustered
      *                   fashion; otherwise false.
-     * 
+     *
      *  @return The Channel instance.
-     * 
+     *
      *  @throws mx.messaging.errors.InvalidChannelError If no Channel has the specified id.
      */
-    public static function getChannel(id:String, 
+    public static function getChannel(id:String,
                                       clustered:Boolean = false):Channel
     {
         var channel:Channel;

            for (var j:uint = 0; j<ids.length; j++)
            {
                dsChannels = xml.channels.channel.(@id == ids[j]);
                channelConfig = dsChannels[0];                               
                dsUris.push(channelConfig.endpoint[0].attribute(URI_ATTR).toString());
            }
            
            return ObjectUtil.compare(csUris, dsUris) == 0;
            
        }
        return false;
    }
    
    /**
     * @private
     * returns if the specified endpoint has been fetched already

                {
                    // Add as an attribute
                    configXML.@[propertyKey] = propertyValue;
                }
            }
            else if (propertyValue is ArrayCollection || propertyValue is Array)
            {
                var propertyValueList:Array;
                if (propertyValue is ArrayCollection)
                    propertyValueList = ArrayCollection(propertyValue).toArray();
                else
                    propertyValueList = propertyValue as Array;

                for (var i:int = 0; i < propertyValueList.length; i++)
                {
                       var propertyXML1:XML = <{propertyKey}></{propertyKey}>
                    configXML.appendChild(propertyXML1);
                    convertToXML(propertyValueList[i] as ConfigMap, propertyXML1);
                }
            }
            else // assuming that it is ConfigMap
            {
                   var propertyXML2:XML = <{propertyKey}></{propertyKey}>
                configXML.appendChild(propertyXML2);
                convertToXML(propertyValue as ConfigMap, propertyXML2);
            }
        }
    }

    private static function getChannelIds(destinationConfig:XML):Array
    {
        var result:Array = [];
        var channels:XMLList = destinationConfig.channels.channel;
        var n:int = channels.length();
        for (var i:int = 0; i < n; i++)
        {
            result.push(channels[i].@ref.toString());
        }
        return result;
    }

    /**
     * @private
     * This method returns a list of default channel ids for the application
     */
    private static function getDefaultChannelIds():Array
    {
        var result:Array = [];
        var channels:XMLList = xml["default-channels"].channel;
        var n:int = channels.length();
        for (var i:int = 0; i < n; i++)
        {
            result.push(channels[i].@ref.toString());
        }
        return result;
    }

    /**
     *  Returns the destination XML data specific to the destination and message
     *  type specified. Returns null if the destination is not found.
