Exemple #1
0
 private void OnSendFaultComplete(IAsyncResult ar, DatagramProxy proxy)
 {
     try
     {
         proxy.EndSendMessage(ar);
     }
     catch (WsatSendFailureException exception)
     {
         Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.TraceHandledException(exception, TraceEventType.Warning);
         DebugTrace.TraceSendFailure(exception);
         this.state.Perf.MessageSendFailureCountPerInterval.Increment();
     }
 }
 private void OnSendFaultComplete(IAsyncResult ar, DatagramProxy proxy)
 {
     try
     {
         proxy.EndSendMessage(ar);
     }
     catch (WsatSendFailureException exception)
     {
         Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.TraceHandledException(exception, TraceEventType.Warning);
         DebugTrace.TraceSendFailure(exception);
         this.state.Perf.MessageSendFailureCountPerInterval.Increment();
     }
 }
Exemple #3
0
        public void TrySendTwoPhaseCommitCoordinatorFault(EndpointAddress faultTo, UniqueId messageID, Fault fault)
        {
            DatagramProxy proxy = this.state.TryCreateTwoPhaseCommitCoordinatorProxy(faultTo);

            if (proxy == null)
            {
                if (DebugTrace.Warning)
                {
                    DebugTrace.Trace(TraceLevel.Warning, "Could not create a proxy to send {0} fault", fault.Code.Name);
                }
            }
            else
            {
                try
                {
                    this.TrySendFault(proxy, messageID, fault);
                }
                finally
                {
                    proxy.Release();
                }
            }
        }
Exemple #4
0
 private void TrySendFault(DatagramProxy proxy, UniqueId messageID, Fault fault)
 {
     if (proxy == null)
     {
         if (DebugTrace.Warning)
         {
             DebugTrace.Trace(TraceLevel.Warning, "Could not create a proxy to send {0} fault", fault.Code.Name);
         }
     }
     else
     {
         this.state.Perf.FaultsSentCountPerInterval.Increment();
         if (DebugTrace.Info)
         {
             DebugTrace.Trace(TraceLevel.Info, "Sending {0} fault to {1}", fault.Code.Name, Ports.TryGetAddress(proxy));
         }
         IAsyncResult ar = proxy.BeginSendFault(messageID, fault, this.sendFaultComplete, proxy);
         if (ar.CompletedSynchronously)
         {
             this.OnSendFaultComplete(ar, proxy);
         }
     }
 }
 private void TrySendFault(DatagramProxy proxy, UniqueId messageID, Fault fault)
 {
     if (proxy == null)
     {
         if (DebugTrace.Warning)
         {
             DebugTrace.Trace(TraceLevel.Warning, "Could not create a proxy to send {0} fault", fault.Code.Name);
         }
     }
     else
     {
         this.state.Perf.FaultsSentCountPerInterval.Increment();
         if (DebugTrace.Info)
         {
             DebugTrace.Trace(TraceLevel.Info, "Sending {0} fault to {1}", fault.Code.Name, Ports.TryGetAddress(proxy));
         }
         IAsyncResult ar = proxy.BeginSendFault(messageID, fault, this.sendFaultComplete, proxy);
         if (ar.CompletedSynchronously)
         {
             this.OnSendFaultComplete(ar, proxy);
         }
     }
 }