/// <summary>
        /// Handles notifications
        /// </summary>
        /// <param name="args">The notification data</param>
        private void DoNotify(NotificationArgs args)
        {
            if (args.Outcome == RequestOutcome.SendOK)
            {
                bool          notify    = true;
                MessageAccess msgAccess = new MessageAccess(args.Response.XmlData);
                string        msgId     = msgAccess.GetMessageId();
                if (msgId != null && msgId.Length > 0)
                {
                    if (_msgsIds.ContainsKey(Convert.ToDecimal(msgId)))
                    {
                        string msgName = msgAccess.GetMessageName();
                        notify = HandleAcks(msgName, ref args);
                        if (notify)
                        {
                            string str = string.Format("RequestAdapter - About to notify response: {0}, {1}",
                                                       args.Outcome, args.Response.XmlData);
                            Debug.WriteLine(str);
                            if (_responseHandler != null)
                            {
                                _responseHandler(args.Outcome, args.Response);
                            }

                            _messageCount--;
                            if (_messageCount == 0)
                            {
                                _waiting = false;
                            }
                        }
                        else
                        {
                            string str = string.Format("RequestChannelAdapter.NotifyThreadProc - ACK not notified: {0}",
                                                       args.Response.XmlData);
                            Debug.WriteLine(str);
                        }
                    }
                }
                else
                {
                    string str = string.Format("RequestChannelAdapter.NotifyThreadProc - Bad message: {0}",
                                               args.Response.XmlData);
                    Debug.WriteLine(str);
                }
            }
            else
            {
                string str = string.Format("RequestChannelAdapter.NotifyThreadProc - Notifying error: {0}",
                                           args.Outcome);
                Debug.WriteLine(str);
                if (_responseHandler != null)
                {
                    _responseHandler(args.Outcome, null);
                }

                UninitializeChannel(_channel);
                string uri = _channel.Uri;
                try
                {
                    str = string.Format("RequestChannelAdapter.NotifyThreadProc - Closing channel: {0}",
                                        uri);
                    Debug.WriteLine(str);
                    Parameterization.ChannelManager.CloseChannel(uri);

/*					str = string.Format("RequestChannelAdapter.NotifyThreadProc - Opening channel: {0}",
 *                                              uri);
 *                                      Debug.WriteLine(str);
 *                                      _channel = Parameterization.ChannelManager.OpenChannel(uri);
 *                                      InitializeChannel(_channel);
 *                                      str = string.Format("RequestChannelAdapter.NotifyThreadProc - Reattached to channel: {0}",
 *                                              uri);
 *                                      Debug.WriteLine(str);*/
                }
                catch (Exception ex)
                {
                    //str = string.Format("RequestChannelAdapter.NotifyThreadProc - Error reopening channnel: {0}", ex.Message);
                    //Debug.WriteLine(str);
                    CommMain.Logger.AddLog(ex);
                }
            }
        }