Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 42589 invoked from network); 11 Dec 2008 21:04:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Dec 2008 21:04:38 -0000 Received: (qmail 47518 invoked by uid 500); 11 Dec 2008 21:04:51 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 47465 invoked by uid 500); 11 Dec 2008 21:04:51 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 47437 invoked by uid 99); 11 Dec 2008 21:04:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2008 13:04:51 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2008 21:04:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D5001238889B; Thu, 11 Dec 2008 13:04:14 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r725810 - in /activemq/activemq-dotnet: Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ Apache.NMS/trunk/ Apache.NMS/trunk/src/test/csharp/ Date: Thu, 11 Dec 2008 21:04:14 -0000 To: commits@activemq.apache.org From: jgomes@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081211210414.D5001238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jgomes Date: Thu Dec 11 13:04:13 2008 New Revision: 725810 URL: http://svn.apache.org/viewvc?rev=725810&view=rev Log: Apply patches submitted by Daniel Ellis. Thanks, Daniel! Fixes [AMQNET-134]. (See https://issues.apache.org/activemq/browse/AMQNET-134) Added: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NmsTracer.cs Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/SessionId.cs activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionState.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/SessionId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/SessionId.cs?rev=725810&r1=725809&r2=725810&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/SessionId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/SessionId.cs Thu Dec 11 13:04:13 2008 @@ -120,7 +120,7 @@ public SessionId(ProducerId id) { this.connectionId = id.ConnectionId; - this.value = id.Value; + this.value = id.SessionId; } public SessionId(ConsumerId id) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionState.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionState.cs?rev=725810&r1=725809&r2=725810&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionState.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionState.cs Thu Dec 11 13:04:13 2008 @@ -110,7 +110,26 @@ { get { - return sessions[id]; + #if DEBUG + try + { + #endif + return sessions[id]; + #if DEBUG + } + catch(System.Collections.Generic.KeyNotFoundException ex) + { + // Useful for dignosing missing session ids + string sessionList = string.Empty; + foreach(SessionId sessionId in sessions.Keys) + { + sessionList += sessionId.ToString() + "\n"; + } + System.Diagnostics.Debug.Assert(false, + string.Format("Session '{0}' did not exist in the sessions collection.\n\nSessions:-\n{1}", id, sessionList)); + throw; + } + #endif } } Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs?rev=725810&r1=725809&r2=725810&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs Thu Dec 11 13:04:13 2008 @@ -35,6 +35,11 @@ protected string passWord; protected string userName; + static NMSTestSupport() + { + Apache.NMS.Tracer.Trace = new NmsTracer(); + } + public NMSTestSupport() { } Added: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NmsTracer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NmsTracer.cs?rev=725810&view=auto ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NmsTracer.cs (added) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NmsTracer.cs Thu Dec 11 13:04:13 2008 @@ -0,0 +1,61 @@ +using System; +using System.Diagnostics; + +namespace Apache.NMS.Test +{ + public class NmsTracer : Apache.NMS.ITrace + { + #region ITrace Members + public void Debug(string message) + { + Trace.WriteLine("DEBUG: " + message); + } + + public void Error(string message) + { + Trace.WriteLine("ERROR: " + message); + } + + public void Fatal(object message) + { + Trace.WriteLine("FATAL: " + message); + } + + public void Info(string message) + { + Trace.WriteLine("INFO: " + message); + } + + public void Warn(string message) + { + Trace.WriteLine("WARN: " + message); + } + + public bool IsDebugEnabled + { + get { return true; } + } + + public bool IsErrorEnabled + { + get { return true; } + } + + public bool IsFatalEnabled + { + get { return true; } + } + + public bool IsInfoEnabled + { + get { return true; } + } + + public bool IsWarnEnabled + { + get { return true; } + } + + #endregion + } +} Modified: activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj?rev=725810&r1=725809&r2=725810&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj Thu Dec 11 13:04:13 2008 @@ -96,6 +96,7 @@ Code + Code