You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2017/03/06 23:29:25 UTC

[01/50] [abbrv] activemq-nms-stomp git commit: Merge in fixes from trunk

Repository: activemq-nms-stomp
Updated Branches:
  refs/heads/1.2.x [created] ddd11a496
  refs/heads/1.3.x [created] 7e3beeb6b
  refs/heads/1.4.x [created] 3c866c59d
  refs/heads/1.5.x [created] 77473f8ec
  refs/heads/1.6.x [created] 3c7acacab
  refs/heads/1.7.x [created] 627095830
  refs/heads/master [created] 4ba60e96c


Merge in fixes from trunk


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/ecfa0000
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/ecfa0000
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/ecfa0000

Branch: refs/heads/1.2.x
Commit: ecfa00005976279160c5839f3e58f37d676781ee
Parents: 4b981ae
Author: Timothy A. Bish <ta...@apache.org>
Authored: Tue Feb 9 14:33:03 2010 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Tue Feb 9 14:33:03 2010 +0000

----------------------------------------------------------------------
 nant-common.xml                      | 28 ++++++++++++++--------------
 nant.build                           |  4 ++--
 src/main/csharp/ConnectionFactory.cs |  6 +++---
 3 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/ecfa0000/nant-common.xml
----------------------------------------------------------------------
diff --git a/nant-common.xml b/nant-common.xml
index 1be2614..4099f39 100644
--- a/nant-common.xml
+++ b/nant-common.xml
@@ -41,7 +41,7 @@
 	<property name="current.build.config"    value="${if(project.release.type == 'release', 'release', 'debug')}" overwrite="false" />
 	<property name="current.build.framework" value="${framework::get-target-framework()}" overwrite="false" />
 	<property name="current.build.defines"   value="${build.defines}" />
-	<property name="build.framework.strings" value="net-2.0,net-3.5,mono-2.0,netcf-2.0" unless="${property::exists('build.framework.strings')}"/>
+	<property name="build.framework.strings" value="net-2.0,net-3.5,mono-2.0,netcf-2.0,netcf-3.5" unless="${property::exists('build.framework.strings')}"/>
 	<property name="current.build.framework.assembly.dir" value="${framework::get-assembly-directory(framework::get-target-framework())}" dynamic="true" />
 
 	<property name="build.config.strings"    value="${if(property::exists('configuration'), configuration, if(build.skip.release == 'true', 'debug', 'debug,release'))}" dynamic="true" />
@@ -194,18 +194,6 @@
 		<property name="csc.optimize" value="true" />
 	</target>
 
-	<target name="set-net-1.1-framework-configuration">
-		<property name="current.build.framework" value="net-1.1" />
-		<property name="current.build.framework.name" value=".NET 1.1" />
-		<property name="current.build.defines" value="${build.defines}NET,NET_1_1" dynamic="true" />
-		<property name="current.build.framework.sign" value="false" />
-		<property name="link.sdkdoc.version" value="SDK_v1_1" />
-		<property name="link.sdkdoc.web" value="true" />
-		<if test="${framework::exists(current.build.framework)}">
-			<property name="nant.settings.currentframework" value="${current.build.framework}" />
-		</if>
-	</target>
-
 	<target name="set-net-2.0-framework-configuration">
 		<property name="current.build.framework" value="net-2.0" />
 		<property name="current.build.framework.name" value=".NET 2.0" />
@@ -234,7 +222,7 @@
 		<property name="current.build.framework" value="netcf-2.0" />
 		<property name="current.build.framework.name" value=".NET Compact Framework 2.0" />
 		<property name="current.build.defines" value="${build.defines}PocketPC,NETCF,NETCF_2_0" dynamic="true" />
-		<property name="current.build.framework.sign" value="false" />
+		<property name="current.build.framework.sign" value="true" />
 		<property name="link.sdkdoc.version" value="SDK_v1_1" />
 		<property name="link.sdkdoc.web" value="true" />
 		<if test="${framework::exists(current.build.framework)}">
@@ -242,6 +230,18 @@
 		</if>
 	</target>
 
+	<target name="set-netcf-3.5-framework-configuration">
+		<property name="current.build.framework" value="netcf-3.5" />
+		<property name="current.build.framework.name" value=".NET Compact Framework 3.5" />
+		<property name="current.build.defines" value="${build.defines}PocketPC,NETCF,NETCF_3_5" dynamic="true" />
+		<property name="current.build.framework.sign" value="true" />
+		<property name="link.sdkdoc.version" value="SDK_v3_5" />
+		<property name="link.sdkdoc.web" value="true" />
+		<if test="${framework::exists(current.build.framework)}">
+			<property name="nant.settings.currentframework" value="${current.build.framework}" />
+		</if>
+	</target>
+
 	<target name="set-mono-2.0-framework-configuration">
 		<property name="current.build.framework" value="mono-2.0" />
 		<property name="current.build.framework.name" value="Mono 2.0" />

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/ecfa0000/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 3605c1a..1b1a499 100644
--- a/nant.build
+++ b/nant.build
@@ -22,8 +22,8 @@
     <property name="basedir" value="${project::get-base-directory()}" />
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
-    <property name="project.version" value="1.2.0" unless="${property::exists('project.version')}" />
-    <property name="project.release.type" value="RC" unless="${property::exists('project.release.type')}" />
+    <property name="project.version" value="1.2.1" unless="${property::exists('project.version')}" />
+    <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />
 

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/ecfa0000/src/main/csharp/ConnectionFactory.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/ConnectionFactory.cs b/src/main/csharp/ConnectionFactory.cs
index 4374e97..d34cd5f 100755
--- a/src/main/csharp/ConnectionFactory.cs
+++ b/src/main/csharp/ConnectionFactory.cs
@@ -111,10 +111,10 @@ namespace Apache.NMS.Stomp
 
                 connection = new Connection(uri, transport, this.ClientIdGenerator);
 
-                ConfigureConnection(connection);
+                connection.UserName = userName;
+                connection.Password = password;
 
-                connection.UserName = this.connectionUserName;
-                connection.Password = this.connectionPassword;
+                ConfigureConnection(connection);
 
                 if(this.clientId != null)
                 {


[08/50] [abbrv] activemq-nms-stomp git commit: Update to reflect 1.4.0 release.

Posted by ta...@apache.org.
Update to reflect 1.4.0 release.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/88513eb1
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/88513eb1
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/88513eb1

Branch: refs/heads/1.4.x
Commit: 88513eb17e487bdce8d4bd61b76832a10dcf08ca
Parents: 0b497f1
Author: Timothy A. Bish <ta...@apache.org>
Authored: Tue Sep 7 14:29:05 2010 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Tue Sep 7 14:29:05 2010 +0000

----------------------------------------------------------------------
 nant.build  | 2 +-
 package.ps1 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/88513eb1/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 20f9cd7..5a731ad 100644
--- a/nant.build
+++ b/nant.build
@@ -23,7 +23,7 @@
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
     <property name="project.version" value="1.4.0" unless="${property::exists('project.version')}" />
-    <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
+    <property name="project.release.type" value="GA" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />
 

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/88513eb1/package.ps1
----------------------------------------------------------------------
diff --git a/package.ps1 b/package.ps1
index addc13d..b0d38d6 100644
--- a/package.ps1
+++ b/package.ps1
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 $pkgname = "Apache.NMS.Stomp"
-$pkgver = "1.4.0-SNAPSHOT"
+$pkgver = "1.4.0"
 $configurations = "release", "debug"
 $frameworks = "mono-2.0", "net-2.0", "net-3.5", "netcf-2.0"
 


[21/50] [abbrv] activemq-nms-stomp git commit: Merged

Posted by ta...@apache.org.
Merged

fix for: https://issues.apache.org/jira/browse/AMQNET-314
fix for: https://issues.apache.org/jira/browse/AMQNET-313


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/d64215a2
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/d64215a2
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/d64215a2

Branch: refs/heads/1.5.x
Commit: d64215a29420cf611127a25768c51bb03eb7029a
Parents: c036806
Author: Timothy A. Bish <ta...@apache.org>
Authored: Wed Jan 26 22:52:30 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Wed Jan 26 22:52:30 2011 +0000

----------------------------------------------------------------------
 src/main/csharp/MessageConsumer.cs | 19 ++++++++++++++++---
 src/main/csharp/Session.cs         |  1 +
 2 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/d64215a2/src/main/csharp/MessageConsumer.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/MessageConsumer.cs b/src/main/csharp/MessageConsumer.cs
index 27c8b2f..0d0885e 100755
--- a/src/main/csharp/MessageConsumer.cs
+++ b/src/main/csharp/MessageConsumer.cs
@@ -55,8 +55,8 @@ namespace Apache.NMS.Stomp
         private bool inProgressClearRequiredFlag;
 
         private event MessageListener listener;
-
         private IRedeliveryPolicy redeliveryPolicy;
+        private Exception failureError;
 
         // Constructor internal to prevent clients from creating an instance.
         internal MessageConsumer(Session session, ConsumerInfo info)
@@ -534,7 +534,14 @@ namespace Apache.NMS.Stomp
                     }
                     else
                     {
-                        return null;
+                        if(this.failureError != null)
+                        {
+                            throw NMSExceptionSupport.Create(FailureError);
+                        }
+                        else
+                        {
+                            return null;
+                        }
                     }
                 }
                 else if(dispatch.Message == null)
@@ -878,10 +885,16 @@ namespace Apache.NMS.Stomp
         {
             if(this.listener != null)
             {
-                throw new NMSException("Cannot set Async listeners on Consumers with a prefetch limit of zero");
+                throw new NMSException("Cannot perform a Synchronous Receive when there is a registered asynchronous listener.");
             }
         }
 
+        public Exception FailureError
+        {
+            get { return this.failureError; }
+            set { this.failureError = value; }
+        }
+
         #region Nested ISyncronization Types
 
         class MessageConsumerSynchronization : ISynchronization

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/d64215a2/src/main/csharp/Session.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Session.cs b/src/main/csharp/Session.cs
index 6770283..63ed02d 100755
--- a/src/main/csharp/Session.cs
+++ b/src/main/csharp/Session.cs
@@ -303,6 +303,7 @@ namespace Apache.NMS.Stomp
                     {
                         foreach(MessageConsumer consumer in consumers.Values)
                         {
+                            consumer.FailureError = this.connection.FirstFailureError;
                             consumer.DoClose();
                         }
                     }


[34/50] [abbrv] activemq-nms-stomp git commit: Remove zombie consumers that were created after failover. Fixes https://issues.apache.org/jira/browse/AMQNET-394

Posted by ta...@apache.org.
Remove zombie consumers that were created after failover.  Fixes https://issues.apache.org/jira/browse/AMQNET-394


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/fd6ddc41
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/fd6ddc41
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/fd6ddc41

Branch: refs/heads/1.5.x
Commit: fd6ddc41bab706e30f822a9b4d603156dfe7c624
Parents: fa16a57
Author: Jim Gomes <jg...@apache.org>
Authored: Fri Aug 17 23:19:09 2012 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Fri Aug 17 23:19:09 2012 +0000

----------------------------------------------------------------------
 src/main/csharp/Connection.cs | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/fd6ddc41/src/main/csharp/Connection.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index 4ca6aa5..ba3ccd3 100755
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -683,6 +683,7 @@ namespace Apache.NMS.Stomp
             }
 
             Tracer.Error("No such consumer active: " + dispatch.ConsumerId);
+            transport.Oneway(new RemoveInfo() { ObjectId = dispatch.ConsumerId });
         }
 
         protected void OnTransportException(ITransport sender, Exception exception)


[12/50] [abbrv] activemq-nms-stomp git commit: Update branch projects to use NUnit 2.5.8.

Posted by ta...@apache.org.
Update branch projects to use NUnit 2.5.8.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/3c866c59
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/3c866c59
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/3c866c59

Branch: refs/heads/1.4.x
Commit: 3c866c59d786fa85510a933fd123d9ea2e61438d
Parents: 4a6b1b4
Author: Jim Gomes <jg...@apache.org>
Authored: Thu Nov 11 00:40:11 2010 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Thu Nov 11 00:40:11 2010 +0000

----------------------------------------------------------------------
 nant.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/3c866c59/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 68e9038..16811e8 100644
--- a/nant.build
+++ b/nant.build
@@ -57,7 +57,7 @@
         <!-- Property grouping for 'vendor.nunit.org' -->
         <property name="vendor.nunit.org.name" value="NUnit" />
         <property name="vendor.nunit.org.group" value="org.nunit" />
-        <property name="vendor.nunit.org.version" value="2.5.5" />
+        <property name="vendor.nunit.org.version" value="2.5.8" />
         <property name="vendor.nunit.org.filenames" value="nunit.framework.dll" />
     </target>
 


[06/50] [abbrv] activemq-nms-stomp git commit: Update build and package files with 1.3.x version no.

Posted by ta...@apache.org.
Update build and package files with 1.3.x version no.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/7e3beeb6
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/7e3beeb6
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/7e3beeb6

Branch: refs/heads/1.3.x
Commit: 7e3beeb6bbd289488667ed98829f2cb5fd1418d5
Parents: 14e5920
Author: Timothy A. Bish <ta...@apache.org>
Authored: Mon May 24 21:15:02 2010 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Mon May 24 21:15:02 2010 +0000

----------------------------------------------------------------------
 nant.build  |  2 +-
 package.ps1 | 60 ++++++++++++++++++++++++++++----------------------------
 2 files changed, 31 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/7e3beeb6/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 766e085..067ec50 100644
--- a/nant.build
+++ b/nant.build
@@ -22,7 +22,7 @@
     <property name="basedir" value="${project::get-base-directory()}" />
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
-    <property name="project.version" value="1.3.0" unless="${property::exists('project.version')}" />
+    <property name="project.version" value="1.3.x" unless="${property::exists('project.version')}" />
     <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/7e3beeb6/package.ps1
----------------------------------------------------------------------
diff --git a/package.ps1 b/package.ps1
index 2b14cbb..79667e1 100644
--- a/package.ps1
+++ b/package.ps1
@@ -14,49 +14,49 @@
 # limitations under the License.
 
 $pkgname = "Apache.NMS.Stomp"
-$pkgver = "1.2.0"
+$pkgver = "1.3.x-SNAPSHOT"
 $configurations = "release", "debug"
 $frameworks = "mono-2.0", "net-2.0", "net-3.5", "netcf-2.0"
 
 write-progress "Creating package directory." "Initializing..."
 if(!(test-path package))
 {
-	md package
+    md package
 }
 
 if(test-path build)
 {
-	pushd build
+    pushd build
 
-	$pkgdir = "..\package"
+    $pkgdir = "..\package"
 
-	write-progress "Packaging Application files." "Scanning..."
-	$zipfile = "$pkgdir\$pkgname-$pkgver-bin.zip"
-	zip -9 -u -j "$zipfile" ..\LICENSE.txt
-	zip -9 -u -j "$zipfile" ..\NOTICE.txt
-	foreach($configuration in $configurations)
-	{
-		foreach($framework in $frameworks)
-		{
-			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll"
-			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.xml"
-			zip -9 -u "$zipfile" "$framework\$configuration\nmsprovider*.config"
-			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll"
-			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.xml"
-			if($framework -ieq "mono-2.0")
-			{
-				zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll.mdb"
-				zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll.mdb"
-			}
-			else
-			{
-				zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.pdb"
-				zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.pdb"
-			}
-		}
-	}
+    write-progress "Packaging Application files." "Scanning..."
+    $zipfile = "$pkgdir\$pkgname-$pkgver-bin.zip"
+    zip -9 -u -j "$zipfile" ..\LICENSE.txt
+    zip -9 -u -j "$zipfile" ..\NOTICE.txt
+    foreach($configuration in $configurations)
+    {
+        foreach($framework in $frameworks)
+        {
+            zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll"
+            zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.xml"
+            zip -9 -u "$zipfile" "$framework\$configuration\nmsprovider*.config"
+            zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll"
+            zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.xml"
+            if($framework -ieq "mono-2.0")
+            {
+                zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll.mdb"
+                zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll.mdb"
+            }
+            else
+            {
+                zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.pdb"
+                zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.pdb"
+            }
+        }
+    }
 
-	popd
+    popd
 }
 
 write-progress "Packaging Source code files." "Scanning..."


[17/50] [abbrv] activemq-nms-stomp git commit: fix for: https://issues.apache.org/jira/browse/AMQNET-311

Posted by ta...@apache.org.
fix for: https://issues.apache.org/jira/browse/AMQNET-311


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/419f24f8
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/419f24f8
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/419f24f8

Branch: refs/heads/1.5.x
Commit: 419f24f8a19b608b8ec011546cc829f9a6414575
Parents: 836e216
Author: Timothy A. Bish <ta...@apache.org>
Authored: Mon Jan 24 15:03:00 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Mon Jan 24 15:03:00 2011 +0000

----------------------------------------------------------------------
 src/main/csharp/Transport/Tcp/SslTransport.cs | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/419f24f8/src/main/csharp/Transport/Tcp/SslTransport.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Transport/Tcp/SslTransport.cs b/src/main/csharp/Transport/Tcp/SslTransport.cs
index f5a39b6..d1fcf51 100644
--- a/src/main/csharp/Transport/Tcp/SslTransport.cs
+++ b/src/main/csharp/Transport/Tcp/SslTransport.cs
@@ -35,7 +35,7 @@ namespace Apache.NMS.Stomp.Transport.Tcp
         private string keyStoreName;
         private string keyStoreLocation;
         private bool acceptInvalidBrokerCert = false;
-        
+
         private SslStream sslStream;
 
         public SslTransport(Uri location, Socket socket, IWireFormat wireFormat) :
@@ -84,7 +84,7 @@ namespace Apache.NMS.Stomp.Transport.Tcp
             get { return this.clientCertPassword; }
             set { this.clientCertPassword = value; }
         }
-       
+
         /// <summary>
         /// Indicates if the SslTransport should ignore any errors in the supplied Broker
         /// certificate and connect anyway, this is useful in testing with a default AMQ
@@ -116,7 +116,7 @@ namespace Apache.NMS.Stomp.Transport.Tcp
             }
 
             this.sslStream = new SslStream(
-                new NetworkStream(this.socket), 
+                new NetworkStream(this.socket),
                 false,
                 new RemoteCertificateValidationCallback(ValidateServerCertificate),
                 new LocalCertificateSelectionCallback(SelectLocalCertificate) );
@@ -128,7 +128,7 @@ namespace Apache.NMS.Stomp.Transport.Tcp
                 Tracer.Debug("Authorizing as Client for Server: " + remoteCertName);
                 sslStream.AuthenticateAsClient(remoteCertName, LoadCertificates(), SslProtocols.Default, false);
                 Tracer.Debug("Server is Authenticated = " + sslStream.IsAuthenticated);
-                Tracer.Debug("Server is Encrypted = " + sslStream.IsEncrypted);                
+                Tracer.Debug("Server is Encrypted = " + sslStream.IsEncrypted);
             }
             catch(Exception e)
             {
@@ -178,13 +178,13 @@ namespace Apache.NMS.Stomp.Transport.Tcp
             // Configuration may or may not allow us to connect with an invliad broker cert.
             return AcceptInvalidBrokerCert;
         }
-        
+
         private X509Certificate SelectLocalCertificate(object sender,
-                                                       string targetHost, 
-                                                       X509CertificateCollection localCertificates, 
-                                                       X509Certificate remoteCertificate, 
+                                                       string targetHost,
+                                                       X509CertificateCollection localCertificates,
+                                                       X509Certificate remoteCertificate,
                                                        string[] acceptableIssuers)
-        {    
+        {
             Tracer.DebugFormat("Client is selecting a local certificate from {0} possibilities.", localCertificates.Count);
 
             if(localCertificates.Count == 1)
@@ -244,14 +244,14 @@ namespace Apache.NMS.Stomp.Transport.Tcp
                 }
 
                 X509Store store = new X509Store(name, location);
-
                 collection = store.Certificates;
+                store.Close();
             }
 
             return collection;
         }
-        
+
     }
 }
 
-#endif
\ No newline at end of file
+#endif


[43/50] [abbrv] activemq-nms-stomp git commit: Branch 1.6.x version.

Posted by ta...@apache.org.
Branch 1.6.x version.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/f895efff
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/f895efff
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/f895efff

Branch: refs/heads/1.6.x
Commit: f895efff9d97b6a77567779bcf527cf6cc49e3ae
Parents: 20b8cc2
Author: Jim Gomes <jg...@apache.org>
Authored: Wed Mar 12 23:30:27 2014 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Wed Mar 12 23:30:27 2014 +0000

----------------------------------------------------------------------

----------------------------------------------------------------------



[23/50] [abbrv] activemq-nms-stomp git commit: fix for: https://issues.apache.org/jira/browse/AMQNET-315

Posted by ta...@apache.org.
fix for: https://issues.apache.org/jira/browse/AMQNET-315


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/1f460424
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/1f460424
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/1f460424

Branch: refs/heads/1.5.x
Commit: 1f4604244f7f00a68ab7d3454d71f4a958eafe08
Parents: d7ef00e
Author: Timothy A. Bish <ta...@apache.org>
Authored: Sun Feb 6 23:50:25 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Sun Feb 6 23:50:25 2011 +0000

----------------------------------------------------------------------
 src/main/csharp/Protocol/StompFrame.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/1f460424/src/main/csharp/Protocol/StompFrame.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Protocol/StompFrame.cs b/src/main/csharp/Protocol/StompFrame.cs
index 1b0f542..52ef99b 100644
--- a/src/main/csharp/Protocol/StompFrame.cs
+++ b/src/main/csharp/Protocol/StompFrame.cs
@@ -232,7 +232,7 @@ namespace Apache.NMS.Stomp.Protocol
             {
                 MemoryStream ms = new MemoryStream();
                 int nextChar;
-                while((nextChar = dataIn.Read()) != 0)
+                while((nextChar = dataIn.ReadByte()) != 0)
                 {
                     // The first Null in this case marks the end of data.
                     if(nextChar < 0)


[02/50] [abbrv] activemq-nms-stomp git commit: Revert unintended merge.

Posted by ta...@apache.org.
Revert unintended merge.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/7d932d29
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/7d932d29
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/7d932d29

Branch: refs/heads/1.2.x
Commit: 7d932d29ac90687fbdfc4dbf263d84bd5d7a2faf
Parents: ecfa000
Author: Jim Gomes <jg...@apache.org>
Authored: Tue Feb 9 22:39:24 2010 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Tue Feb 9 22:39:24 2010 +0000

----------------------------------------------------------------------
 nant-common.xml | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/7d932d29/nant-common.xml
----------------------------------------------------------------------
diff --git a/nant-common.xml b/nant-common.xml
index 4099f39..1be2614 100644
--- a/nant-common.xml
+++ b/nant-common.xml
@@ -41,7 +41,7 @@
 	<property name="current.build.config"    value="${if(project.release.type == 'release', 'release', 'debug')}" overwrite="false" />
 	<property name="current.build.framework" value="${framework::get-target-framework()}" overwrite="false" />
 	<property name="current.build.defines"   value="${build.defines}" />
-	<property name="build.framework.strings" value="net-2.0,net-3.5,mono-2.0,netcf-2.0,netcf-3.5" unless="${property::exists('build.framework.strings')}"/>
+	<property name="build.framework.strings" value="net-2.0,net-3.5,mono-2.0,netcf-2.0" unless="${property::exists('build.framework.strings')}"/>
 	<property name="current.build.framework.assembly.dir" value="${framework::get-assembly-directory(framework::get-target-framework())}" dynamic="true" />
 
 	<property name="build.config.strings"    value="${if(property::exists('configuration'), configuration, if(build.skip.release == 'true', 'debug', 'debug,release'))}" dynamic="true" />
@@ -194,6 +194,18 @@
 		<property name="csc.optimize" value="true" />
 	</target>
 
+	<target name="set-net-1.1-framework-configuration">
+		<property name="current.build.framework" value="net-1.1" />
+		<property name="current.build.framework.name" value=".NET 1.1" />
+		<property name="current.build.defines" value="${build.defines}NET,NET_1_1" dynamic="true" />
+		<property name="current.build.framework.sign" value="false" />
+		<property name="link.sdkdoc.version" value="SDK_v1_1" />
+		<property name="link.sdkdoc.web" value="true" />
+		<if test="${framework::exists(current.build.framework)}">
+			<property name="nant.settings.currentframework" value="${current.build.framework}" />
+		</if>
+	</target>
+
 	<target name="set-net-2.0-framework-configuration">
 		<property name="current.build.framework" value="net-2.0" />
 		<property name="current.build.framework.name" value=".NET 2.0" />
@@ -222,7 +234,7 @@
 		<property name="current.build.framework" value="netcf-2.0" />
 		<property name="current.build.framework.name" value=".NET Compact Framework 2.0" />
 		<property name="current.build.defines" value="${build.defines}PocketPC,NETCF,NETCF_2_0" dynamic="true" />
-		<property name="current.build.framework.sign" value="true" />
+		<property name="current.build.framework.sign" value="false" />
 		<property name="link.sdkdoc.version" value="SDK_v1_1" />
 		<property name="link.sdkdoc.web" value="true" />
 		<if test="${framework::exists(current.build.framework)}">
@@ -230,18 +242,6 @@
 		</if>
 	</target>
 
-	<target name="set-netcf-3.5-framework-configuration">
-		<property name="current.build.framework" value="netcf-3.5" />
-		<property name="current.build.framework.name" value=".NET Compact Framework 3.5" />
-		<property name="current.build.defines" value="${build.defines}PocketPC,NETCF,NETCF_3_5" dynamic="true" />
-		<property name="current.build.framework.sign" value="true" />
-		<property name="link.sdkdoc.version" value="SDK_v3_5" />
-		<property name="link.sdkdoc.web" value="true" />
-		<if test="${framework::exists(current.build.framework)}">
-			<property name="nant.settings.currentframework" value="${current.build.framework}" />
-		</if>
-	</target>
-
 	<target name="set-mono-2.0-framework-configuration">
 		<property name="current.build.framework" value="mono-2.0" />
 		<property name="current.build.framework.name" value="Mono 2.0" />


[36/50] [abbrv] activemq-nms-stomp git commit: Fix call to ErrorFormat().

Posted by ta...@apache.org.
Fix call to ErrorFormat().


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/a15a3fd9
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/a15a3fd9
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/a15a3fd9

Branch: refs/heads/1.5.x
Commit: a15a3fd9d6fe83a5f674e77e7e6144e247aefc67
Parents: e15675c
Author: Jim Gomes <jg...@apache.org>
Authored: Mon Aug 20 19:21:28 2012 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Mon Aug 20 19:21:28 2012 +0000

----------------------------------------------------------------------
 src/main/csharp/Connection.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/a15a3fd9/src/main/csharp/Connection.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index 45e03ec..1ccb6de 100755
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -682,7 +682,7 @@ namespace Apache.NMS.Stomp
                 }
             }
 
-            Tracer.Error("No such consumer active: {0}.  Removing...", dispatch.ConsumerId);
+            Tracer.ErrorFormat("No such consumer active: {0}.  Removing...", dispatch.ConsumerId);
             RemoveInfo info  = new RemoveInfo();
             info.ObjectId = dispatch.ConsumerId;
             transport.Oneway(info);


[45/50] [abbrv] activemq-nms-stomp git commit: Branch NMS.Stomp trunk to 1.7.x, using NMS API 1.7.1. Update trunk to 1.8.0.

Posted by ta...@apache.org.
Branch NMS.Stomp trunk to 1.7.x, using NMS API 1.7.1. Update trunk to 1.8.0.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/10816663
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/10816663
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/10816663

Branch: refs/heads/master
Commit: 10816663a787ebd507353c078188f684b6b28899
Parents: 52e49cc
Author: Jim Gomes <jg...@apache.org>
Authored: Tue Jul 7 20:26:21 2015 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Tue Jul 7 20:26:21 2015 +0000

----------------------------------------------------------------------
 nant.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/10816663/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 0966e76..63fa6b1 100644
--- a/nant.build
+++ b/nant.build
@@ -22,7 +22,7 @@
     <property name="basedir" value="${project::get-base-directory()}" />
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
-    <property name="project.version" value="1.7.0" unless="${property::exists('project.version')}" />
+    <property name="project.version" value="1.8.0" unless="${property::exists('project.version')}" />
     <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />
@@ -46,7 +46,7 @@
         <!-- Property grouping for 'vendor.apache.org' -->
         <property name="vendor.apache.org.name" value="Apache.NMS" />
         <property name="vendor.apache.org.group" value="org.apache.activemq" />
-        <property name="vendor.apache.org.version" value="1.7.0" />
+        <property name="vendor.apache.org.version" value="1.8.0" />
         <if test="${current.build.framework == 'mono-2.0' or current.build.framework == 'mono-4.0'}">
             <property name="vendor.apache.org.filenames" value="Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb" />
         </if>


[09/50] [abbrv] activemq-nms-stomp git commit: fix for: https://issues.apache.org/activemq/browse/AMQNET-281

Posted by ta...@apache.org.
fix for: https://issues.apache.org/activemq/browse/AMQNET-281


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/434a5882
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/434a5882
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/434a5882

Branch: refs/heads/1.4.x
Commit: 434a58821f8c47f74d02e99f5359e247dbfcd960
Parents: 88513eb
Author: Timothy A. Bish <ta...@apache.org>
Authored: Thu Sep 9 20:39:04 2010 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Thu Sep 9 20:39:04 2010 +0000

----------------------------------------------------------------------
 src/main/csharp/ConnectionFactory.cs        | 8 ++++++--
 src/test/csharp/NMSConnectionFactoryTest.cs | 2 ++
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/434a5882/src/main/csharp/ConnectionFactory.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/ConnectionFactory.cs b/src/main/csharp/ConnectionFactory.cs
index ae2e3bd..608fa21 100755
--- a/src/main/csharp/ConnectionFactory.cs
+++ b/src/main/csharp/ConnectionFactory.cs
@@ -160,9 +160,13 @@ namespace Apache.NMS.Stomp
             {
                 brokerUri = new Uri(URISupport.StripPrefix(value.OriginalString, "stomp:"));
 
-                if(brokerUri.Query != null)
+                if(!String.IsNullOrEmpty(brokerUri.Query) && !brokerUri.OriginalString.EndsWith(")"))
                 {
-                    StringDictionary properties = URISupport.ParseQuery(brokerUri.Query);
+                    // Since the Uri class will return the end of a Query string found in a Composite
+                    // URI we must ensure that we trim that off before we proceed.
+                    string query = brokerUri.Query.Substring(brokerUri.Query.LastIndexOf(")") + 1);
+
+                    StringDictionary properties = URISupport.ParseQuery(query);
                 
                     StringDictionary connection = URISupport.ExtractProperties(properties, "connection.");
                     StringDictionary nms = URISupport.ExtractProperties(properties, "nms.");

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/434a5882/src/test/csharp/NMSConnectionFactoryTest.cs
----------------------------------------------------------------------
diff --git a/src/test/csharp/NMSConnectionFactoryTest.cs b/src/test/csharp/NMSConnectionFactoryTest.cs
index 42c3842..238b0b9 100755
--- a/src/test/csharp/NMSConnectionFactoryTest.cs
+++ b/src/test/csharp/NMSConnectionFactoryTest.cs
@@ -28,6 +28,8 @@ namespace Apache.NMS.Stomp.Test
         [Test]
 #if !NETCF
         [TestCase("stomp:tcp://${activemqhost}:61613")]
+        [TestCase("stomp:failover:(tcp://${activemqhost}:61616?keepAlive=false&wireFormat.maxInactivityDuration=1000)")]
+        [TestCase("stomp:failover:(tcp://${activemqhost}:61616?keepAlive=false&wireFormat.maxInactivityDuration=1000)?connection.asyncSend=false")]
 		[TestCase("stomp:tcp://${activemqhost}:61613?connection.asyncsend=false")]
 		[TestCase("stomp:tcp://${activemqhost}:61613?connection.InvalidParameter=true", ExpectedException = typeof(NMSConnectionException))]
 		[TestCase("stomp:tcp://${activemqhost}:61613?connection.InvalidParameter=true", ExpectedException = typeof(NMSConnectionException))]


[30/50] [abbrv] activemq-nms-stomp git commit: Push version to 1.5.3 SNAPSHOT

Posted by ta...@apache.org.
Push version to 1.5.3 SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/8e02b744
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/8e02b744
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/8e02b744

Branch: refs/heads/1.5.x
Commit: 8e02b7442591f62cbdd106bb3ff605b3ac310a3a
Parents: 23302e8
Author: Timothy A. Bish <ta...@apache.org>
Authored: Mon Nov 14 15:54:34 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Mon Nov 14 15:54:34 2011 +0000

----------------------------------------------------------------------
 README.txt  | 18 +++++++++---------
 nant.build  |  2 +-
 package.ps1 |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/8e02b744/README.txt
----------------------------------------------------------------------
diff --git a/README.txt b/README.txt
index abba406..8456037 100644
--- a/README.txt
+++ b/README.txt
@@ -6,10 +6,10 @@ Welcome to:
 For more information see http://activemq.apache.org/nms
 
 =======================================================================
-Building With NAnt 0.86 see http://nant.sourceforge.net/
+Building With NAnt 0.90 see http://nant.sourceforge.net/
 =======================================================================
 
-NAnt version 0.86 or newer is required to build Apache.NMS.Stomp.  Version 0.90
+NAnt version 0.90 or newer is required to build Apache.NMS.Stomp.  Version 0.91
 or newer is highly recommended.
 To build the code using NAnt, run:
 
@@ -39,19 +39,19 @@ To generate the documentation, run:
 Building With Visual Studio 2008
 =======================================================================
 
-First build the project with nant, this will download and install 
+First build the project with nant, this will download and install
 all the 3rd party dependencies for you.
 
-Open the solution File.  Build using "Build"->"Build Solution" 
+Open the solution File.  Build using "Build"->"Build Solution"
 menu option.
 
-The resulting DLLs will be in build\${framework}\debug or the 
-build\${framework}\release directories depending on your settings 
+The resulting DLLs will be in build\${framework}\debug or the
+build\${framework}\release directories depending on your settings
 under "Build"->"Configuration Manager"
 
-If you have the Resharper plugin installed in Visual Studio, you can run 
-all the Unit Tests by using the "ReSharper"->"Unit Testing"->"Run All 
-Tests from Solution" menu option.  Please note that you must run an 
+If you have the Resharper plugin installed in Visual Studio, you can run
+all the Unit Tests by using the "ReSharper"->"Unit Testing"->"Run All
+Tests from Solution" menu option.  Please note that you must run an
 Apache ActiveMQ Broker before kicking off the unit tests.  Otherwise,
 the standalone NUnit test runner can be used.  NUnit version 2.5.8
 is required to build and run the unit tests.

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/8e02b744/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 087e10f..2806560 100644
--- a/nant.build
+++ b/nant.build
@@ -22,7 +22,7 @@
     <property name="basedir" value="${project::get-base-directory()}" />
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
-    <property name="project.version" value="1.5.2" unless="${property::exists('project.version')}" />
+    <property name="project.version" value="1.5.3" unless="${property::exists('project.version')}" />
     <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/8e02b744/package.ps1
----------------------------------------------------------------------
diff --git a/package.ps1 b/package.ps1
index bfa1448..a0a625b 100644
--- a/package.ps1
+++ b/package.ps1
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 $pkgname = "Apache.NMS.Stomp"
-$pkgver = "1.5.2-SNAPSHOT"
+$pkgver = "1.5.3-SNAPSHOT"
 $configurations = "release", "debug"
 $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0", "netcf-2.0"
 


[37/50] [abbrv] activemq-nms-stomp git commit: Reimplement fix for zombie consumers to update the failover state tracker. Fixes https://issues.apache.org/jira/browse/AMQNET-394

Posted by ta...@apache.org.
Reimplement fix for zombie consumers to update the failover state tracker.
Fixes https://issues.apache.org/jira/browse/AMQNET-394


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/e106d93e
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/e106d93e
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/e106d93e

Branch: refs/heads/1.5.x
Commit: e106d93ed962458a53146b40c55cf9a70e224ef2
Parents: a15a3fd
Author: Jim Gomes <jg...@apache.org>
Authored: Mon Aug 20 22:53:27 2012 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Mon Aug 20 22:53:27 2012 +0000

----------------------------------------------------------------------
 src/main/csharp/Connection.cs                           | 5 +----
 src/main/csharp/Transport/Failover/FailoverTransport.cs | 1 +
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/e106d93e/src/main/csharp/Connection.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index 1ccb6de..283158d 100755
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -682,10 +682,7 @@ namespace Apache.NMS.Stomp
                 }
             }
 
-            Tracer.ErrorFormat("No such consumer active: {0}.  Removing...", dispatch.ConsumerId);
-            RemoveInfo info  = new RemoveInfo();
-            info.ObjectId = dispatch.ConsumerId;
-            transport.Oneway(info);
+            Tracer.ErrorFormat("No such consumer active: {0}.", dispatch.ConsumerId);
         }
 
         protected void OnTransportException(ITransport sender, Exception exception)

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/e106d93e/src/main/csharp/Transport/Failover/FailoverTransport.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Transport/Failover/FailoverTransport.cs b/src/main/csharp/Transport/Failover/FailoverTransport.cs
index 12c23af..b4ab1ff 100644
--- a/src/main/csharp/Transport/Failover/FailoverTransport.cs
+++ b/src/main/csharp/Transport/Failover/FailoverTransport.cs
@@ -450,6 +450,7 @@ namespace Apache.NMS.Stomp.Transport.Failover
 
                     if(command.IsRemoveInfo)
                     {
+                        stateTracker.track(command);
                         // Simulate response to RemoveInfo command
                         Response response = new Response();
                         response.CorrelationId = command.CommandId;


[16/50] [abbrv] activemq-nms-stomp git commit: fix for: https://issues.apache.org/jira/browse/AMQNET-310

Posted by ta...@apache.org.
fix for: https://issues.apache.org/jira/browse/AMQNET-310


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/836e216d
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/836e216d
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/836e216d

Branch: refs/heads/1.5.x
Commit: 836e216d7ef8e1cc21bf4679b80ff9e2ec0a3083
Parents: ce876d0
Author: Timothy A. Bish <ta...@apache.org>
Authored: Sun Jan 23 16:45:41 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Sun Jan 23 16:45:41 2011 +0000

----------------------------------------------------------------------
 src/main/csharp/Session.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/836e216d/src/main/csharp/Session.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Session.cs b/src/main/csharp/Session.cs
index f37d738..6770283 100755
--- a/src/main/csharp/Session.cs
+++ b/src/main/csharp/Session.cs
@@ -784,7 +784,7 @@ namespace Apache.NMS.Stomp
 
             lock(this.consumers.SyncRoot)
             {
-                foreach(MessageConsumer consumer in this.consumers)
+                foreach(MessageConsumer consumer in this.consumers.Values)
                 {
                     consumer.InProgressClearRequired();
                     ThreadPool.QueueUserWorkItem(ClearMessages, consumer);


[29/50] [abbrv] activemq-nms-stomp git commit: Remove reference to non-existent file

Posted by ta...@apache.org.
Remove reference to non-existent file


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/23302e81
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/23302e81
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/23302e81

Branch: refs/heads/1.5.x
Commit: 23302e81bbdceffb7fd5ffa641f829048de72ace
Parents: 5ccb711
Author: Timothy A. Bish <ta...@apache.org>
Authored: Wed Nov 9 13:54:20 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Wed Nov 9 13:54:20 2011 +0000

----------------------------------------------------------------------
 vs2008-stomp.csproj | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/23302e81/vs2008-stomp.csproj
----------------------------------------------------------------------
diff --git a/vs2008-stomp.csproj b/vs2008-stomp.csproj
index 6921324..af8ae79 100644
--- a/vs2008-stomp.csproj
+++ b/vs2008-stomp.csproj
@@ -104,7 +104,6 @@
     <Compile Include="src\main\csharp\Commands\TransactionId.cs" />
     <Compile Include="src\main\csharp\Commands\TransactionInfo.cs" />
     <Compile Include="src\main\csharp\Commands\WireFormatInfo.cs" />
-    <Compile Include="src\main\csharp\Protocol\StompFrameStream.cs" />
     <Compile Include="src\main\csharp\Protocol\StompHelper.cs" />
     <Compile Include="src\main\csharp\Protocol\StompWireFormat.cs" />
     <Compile Include="src\main\csharp\RequestTimedOutException.cs" />


[33/50] [abbrv] activemq-nms-stomp git commit: fix for: https://issues.apache.org/jira/browse/AMQNET-383

Posted by ta...@apache.org.
fix for: https://issues.apache.org/jira/browse/AMQNET-383


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/fa16a570
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/fa16a570
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/fa16a570

Branch: refs/heads/1.5.x
Commit: fa16a5705710661c9d6c2b1338097d9d4b45bc8e
Parents: bbe5c99
Author: Timothy A. Bish <ta...@apache.org>
Authored: Wed Aug 1 14:04:51 2012 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Wed Aug 1 14:04:51 2012 +0000

----------------------------------------------------------------------
 src/main/csharp/Protocol/StompFrame.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/fa16a570/src/main/csharp/Protocol/StompFrame.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Protocol/StompFrame.cs b/src/main/csharp/Protocol/StompFrame.cs
index 527f298..f98b4c9 100644
--- a/src/main/csharp/Protocol/StompFrame.cs
+++ b/src/main/csharp/Protocol/StompFrame.cs
@@ -163,7 +163,7 @@ namespace Apache.NMS.Stomp.Protocol
         {
             if(this.Command == KEEPALIVE)
             {
-                dataOut.Write(NEWLINE);
+                dataOut.Write(BREAK);
                 dataOut.Flush();
                 return;
             }


[48/50] [abbrv] activemq-nms-stomp git commit: Merged revision(s) 1689971 from activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x: Fix exception being thrown when attempting to parse an ID that does not have an embedded ProducerSequenceId. Fixes [A

Posted by ta...@apache.org.
Merged revision(s) 1689971 from activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x:
Fix exception being thrown when attempting to parse an ID that does not have an embedded ProducerSequenceId.
Fixes [AMQNET-492]. (See https://issues.apache.org/jira/browse/AMQNET-492)


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/7c891b7e
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/7c891b7e
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/7c891b7e

Branch: refs/heads/master
Commit: 7c891b7e237d9ab7eb24f2016466dc20690d6663
Parents: 1081666
Author: Jim Gomes <jg...@apache.org>
Authored: Wed Jul 8 22:06:54 2015 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Wed Jul 8 22:06:54 2015 +0000

----------------------------------------------------------------------
 src/main/csharp/Commands/MessageId.cs | 73 ++++++++++++++----------------
 1 file changed, 35 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/7c891b7e/src/main/csharp/Commands/MessageId.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Commands/MessageId.cs b/src/main/csharp/Commands/MessageId.cs
index b559bc3..dd7e202 100644
--- a/src/main/csharp/Commands/MessageId.cs
+++ b/src/main/csharp/Commands/MessageId.cs
@@ -21,20 +21,19 @@ namespace Apache.NMS.Stomp.Commands
 {
     public class MessageId : BaseDataStructure
     {
-        ProducerId producerId;
-        long producerSequenceId;
-        long brokerSequenceId;
-
+        private ProducerId producerId;
+        private long producerSequenceId;
+        private long brokerSequenceId;
         private string key = null;
 
         public MessageId() : base()
         {
         }
 
-        public MessageId(ProducerId producerId, long producerSequenceId) : base()
+        public MessageId(ProducerId prodId, long producerSeqId) : base()
         {
-            this.producerId = producerId;
-            this.producerSequenceId = producerSequenceId;
+            this.producerId = prodId;
+            this.producerSequenceId = producerSeqId;
         }
 
         public MessageId(string value) : base()
@@ -61,12 +60,12 @@ namespace Apache.NMS.Stomp.Commands
         ///
         public override string ToString()
         {
-            if( key == null )
+            if(null == this.key)
             {
-                key = producerId.ToString() + ":" + producerSequenceId;
+                this.key = string.Format("{0}:{1}", this.producerId.ToString(), this.producerSequenceId);
             }
 
-            return key;
+            return this.key;
         }
 
         /// <summary>
@@ -74,33 +73,42 @@ namespace Apache.NMS.Stomp.Commands
         /// </summary>
         public void SetValue(string messageKey)
         {
-            this.key = messageKey;
+            string mkey = messageKey;
+
+            this.key = mkey;
 
             // Parse off the sequenceId
-            int p = messageKey.LastIndexOf(":");
+            int p = mkey.LastIndexOf(":");
             if(p >= 0)
             {
-                producerSequenceId = Int64.Parse(messageKey.Substring(p + 1));
-                messageKey = messageKey.Substring(0, p);
+                if(Int64.TryParse(mkey.Substring(p + 1), out this.producerSequenceId))
+                {
+                    mkey = mkey.Substring(0, p);
+                }
+                else
+                {
+                    this.producerSequenceId = 0;
+                }
             }
-            producerId = new ProducerId(messageKey);
+
+            producerId = new ProducerId(mkey);
         }
 
         public ProducerId ProducerId
         {
-            get { return producerId; }
+            get { return this.producerId; }
             set { this.producerId = value; }
         }
 
         public long ProducerSequenceId
         {
-            get { return producerSequenceId; }
+            get { return this.producerSequenceId; }
             set { this.producerSequenceId = value; }
         }
 
         public long BrokerSequenceId
         {
-            get { return brokerSequenceId; }
+            get { return this.brokerSequenceId; }
             set { this.brokerSequenceId = value; }
         }
 
@@ -108,9 +116,9 @@ namespace Apache.NMS.Stomp.Commands
         {
             int answer = 0;
 
-            answer = (answer * 37) + HashCode(ProducerId);
-            answer = (answer * 37) + HashCode(ProducerSequenceId);
-            answer = (answer * 37) + HashCode(BrokerSequenceId);
+            answer = (answer * 37) + HashCode(this.ProducerId);
+            answer = (answer * 37) + HashCode(this.ProducerSequenceId);
+            answer = (answer * 37) + HashCode(this.BrokerSequenceId);
 
             return answer;
         }
@@ -121,26 +129,15 @@ namespace Apache.NMS.Stomp.Commands
             {
                 return Equals((MessageId) that);
             }
+
             return false;
         }
 
         public virtual bool Equals(MessageId that)
         {
-            if(!Equals(this.ProducerId, that.ProducerId))
-            {
-                return false;
-            }
-            if(!Equals(this.ProducerSequenceId, that.ProducerSequenceId))
-            {
-                return false;
-            }
-            if(!Equals(this.BrokerSequenceId, that.BrokerSequenceId))
-            {
-                return false;
-            }
-
-            return true;
+            return (Equals(this.ProducerId, that.ProducerId)
+                    && Equals(this.ProducerSequenceId, that.ProducerSequenceId)
+                    && Equals(this.BrokerSequenceId, that.BrokerSequenceId));
         }
-    };
-}
-
+    }
+}
\ No newline at end of file


[14/50] [abbrv] activemq-nms-stomp git commit: Merge from trunk

Posted by ta...@apache.org.
Merge from trunk

fix for: https://issues.apache.org/jira/browse/AMQNET-308
fix for: https://issues.apache.org/jira/browse/AMQNET-307


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/196ee4bb
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/196ee4bb
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/196ee4bb

Branch: refs/heads/1.5.x
Commit: 196ee4bb0ade61f14434e91a418c58224935bc37
Parents: 9ece124
Author: Timothy A. Bish <ta...@apache.org>
Authored: Fri Jan 21 15:03:17 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Fri Jan 21 15:03:17 2011 +0000

----------------------------------------------------------------------
 src/main/csharp/Protocol/StompWireFormat.cs | 26 +++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/196ee4bb/src/main/csharp/Protocol/StompWireFormat.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Protocol/StompWireFormat.cs b/src/main/csharp/Protocol/StompWireFormat.cs
index 5554e19..6b864f7 100644
--- a/src/main/csharp/Protocol/StompWireFormat.cs
+++ b/src/main/csharp/Protocol/StompWireFormat.cs
@@ -32,6 +32,7 @@ namespace Apache.NMS.Stomp.Protocol
         private IPrimitiveMapMarshaler mapMarshaler = new XmlPrimitiveMapMarshaler();
         private ITransport transport;
         private WireFormatInfo remoteWireFormatInfo;
+        private int connectedResponseId = -1;
 
         public StompWireFormat()
         {
@@ -190,8 +191,6 @@ namespace Apache.NMS.Stomp.Protocol
 
         protected virtual Command ReadConnected(StompFrame frame)
         {
-            string responseId = frame.RemoveProperty("response-id");
-
             this.remoteWireFormatInfo = new WireFormatInfo();
 
             if(frame.HasProperty("version"))
@@ -222,11 +221,16 @@ namespace Apache.NMS.Stomp.Protocol
                 remoteWireFormatInfo.Version = 1.0f;
             }
 
-            if(responseId != null)
+            if(this.connectedResponseId != -1)
             {
                 Response answer = new Response();
-                answer.CorrelationId = Int32.Parse(responseId);
+                answer.CorrelationId = this.connectedResponseId;
                 SendCommand(answer);
+                this.connectedResponseId = -1;
+            }
+            else
+            {
+                throw new IOException("Received Connected Frame without a set Response Id for it.");
             }
 
             return remoteWireFormatInfo;
@@ -421,6 +425,7 @@ namespace Apache.NMS.Stomp.Protocol
             }   
 
             frame.SetProperty("message-id", command.LastMessageId.ToString());
+            frame.SetProperty("subscription", command.ConsumerId.ToString());
 
             if(command.TransactionId != null)
             {
@@ -442,9 +447,14 @@ namespace Apache.NMS.Stomp.Protocol
             StompFrame frame = new StompFrame("CONNECT");
 
             frame.SetProperty("client-id", command.ClientId);
-            frame.SetProperty("login", command.UserName);
-            frame.SetProperty("passcode", command.Password);
-            frame.SetProperty("request-id", command.CommandId);
+            if(!String.IsNullOrEmpty(command.UserName))
+            {
+                frame.SetProperty("login", command.UserName);
+            }
+            if(!String.IsNullOrEmpty(command.Password))
+            {
+                frame.SetProperty("passcode", command.Password);
+            }
             frame.SetProperty("host", command.Host);
             frame.SetProperty("accept-version", "1.0,1.1");
 
@@ -458,6 +468,8 @@ namespace Apache.NMS.Stomp.Protocol
                 Tracer.Debug("StompWireFormat - Writing " + frame.ToString());
             }
 
+            this.connectedResponseId = command.CommandId;
+
             frame.ToStream(dataOut);
         }
 


[47/50] [abbrv] activemq-nms-stomp git commit: Fix exception being thrown when attempting to parse an ID that does not have an embedded ProducerSequenceId. Fixes [AMQNET-492]. (See https://issues.apache.org/jira/browse/AMQNET-492)

Posted by ta...@apache.org.
Fix exception being thrown when attempting to parse an ID that does not have an embedded ProducerSequenceId.
Fixes [AMQNET-492]. (See https://issues.apache.org/jira/browse/AMQNET-492)



Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/35d3fb6d
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/35d3fb6d
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/35d3fb6d

Branch: refs/heads/1.7.x
Commit: 35d3fb6d44764c7c39d5f284204a2c51b186cbd3
Parents: 7cabda2
Author: Jim Gomes <jg...@apache.org>
Authored: Wed Jul 8 22:05:36 2015 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Wed Jul 8 22:05:36 2015 +0000

----------------------------------------------------------------------
 src/main/csharp/Commands/MessageId.cs | 73 ++++++++++++++----------------
 1 file changed, 35 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/35d3fb6d/src/main/csharp/Commands/MessageId.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Commands/MessageId.cs b/src/main/csharp/Commands/MessageId.cs
index b559bc3..dd7e202 100644
--- a/src/main/csharp/Commands/MessageId.cs
+++ b/src/main/csharp/Commands/MessageId.cs
@@ -21,20 +21,19 @@ namespace Apache.NMS.Stomp.Commands
 {
     public class MessageId : BaseDataStructure
     {
-        ProducerId producerId;
-        long producerSequenceId;
-        long brokerSequenceId;
-
+        private ProducerId producerId;
+        private long producerSequenceId;
+        private long brokerSequenceId;
         private string key = null;
 
         public MessageId() : base()
         {
         }
 
-        public MessageId(ProducerId producerId, long producerSequenceId) : base()
+        public MessageId(ProducerId prodId, long producerSeqId) : base()
         {
-            this.producerId = producerId;
-            this.producerSequenceId = producerSequenceId;
+            this.producerId = prodId;
+            this.producerSequenceId = producerSeqId;
         }
 
         public MessageId(string value) : base()
@@ -61,12 +60,12 @@ namespace Apache.NMS.Stomp.Commands
         ///
         public override string ToString()
         {
-            if( key == null )
+            if(null == this.key)
             {
-                key = producerId.ToString() + ":" + producerSequenceId;
+                this.key = string.Format("{0}:{1}", this.producerId.ToString(), this.producerSequenceId);
             }
 
-            return key;
+            return this.key;
         }
 
         /// <summary>
@@ -74,33 +73,42 @@ namespace Apache.NMS.Stomp.Commands
         /// </summary>
         public void SetValue(string messageKey)
         {
-            this.key = messageKey;
+            string mkey = messageKey;
+
+            this.key = mkey;
 
             // Parse off the sequenceId
-            int p = messageKey.LastIndexOf(":");
+            int p = mkey.LastIndexOf(":");
             if(p >= 0)
             {
-                producerSequenceId = Int64.Parse(messageKey.Substring(p + 1));
-                messageKey = messageKey.Substring(0, p);
+                if(Int64.TryParse(mkey.Substring(p + 1), out this.producerSequenceId))
+                {
+                    mkey = mkey.Substring(0, p);
+                }
+                else
+                {
+                    this.producerSequenceId = 0;
+                }
             }
-            producerId = new ProducerId(messageKey);
+
+            producerId = new ProducerId(mkey);
         }
 
         public ProducerId ProducerId
         {
-            get { return producerId; }
+            get { return this.producerId; }
             set { this.producerId = value; }
         }
 
         public long ProducerSequenceId
         {
-            get { return producerSequenceId; }
+            get { return this.producerSequenceId; }
             set { this.producerSequenceId = value; }
         }
 
         public long BrokerSequenceId
         {
-            get { return brokerSequenceId; }
+            get { return this.brokerSequenceId; }
             set { this.brokerSequenceId = value; }
         }
 
@@ -108,9 +116,9 @@ namespace Apache.NMS.Stomp.Commands
         {
             int answer = 0;
 
-            answer = (answer * 37) + HashCode(ProducerId);
-            answer = (answer * 37) + HashCode(ProducerSequenceId);
-            answer = (answer * 37) + HashCode(BrokerSequenceId);
+            answer = (answer * 37) + HashCode(this.ProducerId);
+            answer = (answer * 37) + HashCode(this.ProducerSequenceId);
+            answer = (answer * 37) + HashCode(this.BrokerSequenceId);
 
             return answer;
         }
@@ -121,26 +129,15 @@ namespace Apache.NMS.Stomp.Commands
             {
                 return Equals((MessageId) that);
             }
+
             return false;
         }
 
         public virtual bool Equals(MessageId that)
         {
-            if(!Equals(this.ProducerId, that.ProducerId))
-            {
-                return false;
-            }
-            if(!Equals(this.ProducerSequenceId, that.ProducerSequenceId))
-            {
-                return false;
-            }
-            if(!Equals(this.BrokerSequenceId, that.BrokerSequenceId))
-            {
-                return false;
-            }
-
-            return true;
+            return (Equals(this.ProducerId, that.ProducerId)
+                    && Equals(this.ProducerSequenceId, that.ProducerSequenceId)
+                    && Equals(this.BrokerSequenceId, that.BrokerSequenceId));
         }
-    };
-}
-
+    }
+}
\ No newline at end of file


[10/50] [abbrv] activemq-nms-stomp git commit: Create EMS 1.4.x branch. Create EMS 1.4.0 tag. Create MSMQ 1.4.x branch. Create MSMQ 1.4.0 tag. Create WCF 1.4.x branch. Create WCF 1.4.0 tag. Standardize all trunk, branch, and tag build file version names

Posted by ta...@apache.org.
Create EMS 1.4.x branch.
Create EMS 1.4.0 tag.
Create MSMQ 1.4.x branch.
Create MSMQ 1.4.0 tag.
Create WCF 1.4.x branch.
Create WCF 1.4.0 tag.
Standardize all trunk, branch, and tag build file version names for the 1.4 series and 1.5 trunk series.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/e7bba280
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/e7bba280
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/e7bba280

Branch: refs/heads/1.4.x
Commit: e7bba2807c4c2e5ac248761be431242ee4fdacb7
Parents: 434a588
Author: Jim Gomes <jg...@apache.org>
Authored: Tue Sep 21 21:02:11 2010 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Tue Sep 21 21:02:11 2010 +0000

----------------------------------------------------------------------
 nant.build  | 4 ++--
 package.ps1 | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/e7bba280/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 5a731ad..68e9038 100644
--- a/nant.build
+++ b/nant.build
@@ -22,8 +22,8 @@
     <property name="basedir" value="${project::get-base-directory()}" />
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
-    <property name="project.version" value="1.4.0" unless="${property::exists('project.version')}" />
-    <property name="project.release.type" value="GA" unless="${property::exists('project.release.type')}" />
+    <property name="project.version" value="1.4.1" unless="${property::exists('project.version')}" />
+    <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />
 

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/e7bba280/package.ps1
----------------------------------------------------------------------
diff --git a/package.ps1 b/package.ps1
index b0d38d6..4c2209c 100644
--- a/package.ps1
+++ b/package.ps1
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 $pkgname = "Apache.NMS.Stomp"
-$pkgver = "1.4.0"
+$pkgver = "1.4-SNAPSHOT"
 $configurations = "release", "debug"
 $frameworks = "mono-2.0", "net-2.0", "net-3.5", "netcf-2.0"
 


[13/50] [abbrv] activemq-nms-stomp git commit: branch for future 1.5.x maintenance releases.

Posted by ta...@apache.org.
branch for future 1.5.x maintenance releases.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/9ece1245
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/9ece1245
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/9ece1245

Branch: refs/heads/1.5.x
Commit: 9ece1245076edbc06d94508581a936da0f9cfb64
Parents: e87fcbd
Author: Timothy A. Bish <ta...@apache.org>
Authored: Mon Jan 10 19:15:31 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Mon Jan 10 19:15:31 2011 +0000

----------------------------------------------------------------------
 nant.build  |  4 ++--
 package.ps1 | 60 ++++++++++++++++++++++++++++----------------------------
 2 files changed, 32 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/9ece1245/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 5ba0c72..3068a57 100644
--- a/nant.build
+++ b/nant.build
@@ -22,7 +22,7 @@
     <property name="basedir" value="${project::get-base-directory()}" />
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
-    <property name="project.version" value="1.5.0" unless="${property::exists('project.version')}" />
+    <property name="project.version" value="1.5.1" unless="${property::exists('project.version')}" />
     <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />
@@ -46,7 +46,7 @@
         <!-- Property grouping for 'vendor.apache.org' -->
         <property name="vendor.apache.org.name" value="Apache.NMS" />
         <property name="vendor.apache.org.group" value="org.apache.activemq" />
-        <property name="vendor.apache.org.version" value="1.5.0" />
+        <property name="vendor.apache.org.version" value="1.5.1" />
         <if test="${current.build.framework == 'mono-2.0'}">
             <property name="vendor.apache.org.filenames" value="Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb" />
         </if>

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/9ece1245/package.ps1
----------------------------------------------------------------------
diff --git a/package.ps1 b/package.ps1
index 54dc571..832b4eb 100644
--- a/package.ps1
+++ b/package.ps1
@@ -14,49 +14,49 @@
 # limitations under the License.
 
 $pkgname = "Apache.NMS.Stomp"
-$pkgver = "1.5-SNAPSHOT"
+$pkgver = "1.5.1-SNAPSHOT"
 $configurations = "release", "debug"
 $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0", "netcf-2.0"
 
 write-progress "Creating package directory." "Initializing..."
 if(!(test-path package))
 {
-	md package
+    md package
 }
 
 if(test-path build)
 {
-	pushd build
+    pushd build
 
-	$pkgdir = "..\package"
+    $pkgdir = "..\package"
 
-	write-progress "Packaging Application files." "Scanning..."
-	$zipfile = "$pkgdir\$pkgname-$pkgver-bin.zip"
-	zip -9 -u -j "$zipfile" ..\LICENSE.txt
-	zip -9 -u -j "$zipfile" ..\NOTICE.txt
-	foreach($configuration in $configurations)
-	{
-		foreach($framework in $frameworks)
-		{
-			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll"
-			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.xml"
-			zip -9 -u "$zipfile" "$framework\$configuration\nmsprovider*.config"
-			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll"
-			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.xml"
-			if($framework -ieq "mono-2.0")
-			{
-				zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll.mdb"
-				zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll.mdb"
-			}
-			else
-			{
-				zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.pdb"
-				zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.pdb"
-			}
-		}
-	}
+    write-progress "Packaging Application files." "Scanning..."
+    $zipfile = "$pkgdir\$pkgname-$pkgver-bin.zip"
+    zip -9 -u -j "$zipfile" ..\LICENSE.txt
+    zip -9 -u -j "$zipfile" ..\NOTICE.txt
+    foreach($configuration in $configurations)
+    {
+        foreach($framework in $frameworks)
+        {
+            zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll"
+            zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.xml"
+            zip -9 -u "$zipfile" "$framework\$configuration\nmsprovider*.config"
+            zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll"
+            zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.xml"
+            if($framework -ieq "mono-2.0")
+            {
+                zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll.mdb"
+                zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll.mdb"
+            }
+            else
+            {
+                zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.pdb"
+                zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.pdb"
+            }
+        }
+    }
 
-	popd
+    popd
 }
 
 write-progress "Packaging Source code files." "Scanning..."


[38/50] [abbrv] activemq-nms-stomp git commit: update the NMS lib dependency to the latest release.

Posted by ta...@apache.org.
update the NMS lib dependency to the latest release. 


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/f9535dfb
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/f9535dfb
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/f9535dfb

Branch: refs/heads/1.5.x
Commit: f9535dfbe4d601a68370bb33fdc0abe67974ade8
Parents: e106d93
Author: Timothy A. Bish <ta...@apache.org>
Authored: Wed Aug 22 21:23:16 2012 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Wed Aug 22 21:23:16 2012 +0000

----------------------------------------------------------------------
 nant.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/f9535dfb/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 2806560..45a29ac 100644
--- a/nant.build
+++ b/nant.build
@@ -46,7 +46,7 @@
         <!-- Property grouping for 'vendor.apache.org' -->
         <property name="vendor.apache.org.name" value="Apache.NMS" />
         <property name="vendor.apache.org.group" value="org.apache.activemq" />
-        <property name="vendor.apache.org.version" value="1.5.0" />
+        <property name="vendor.apache.org.version" value="1.5.1" />
         <if test="${current.build.framework == 'mono-2.0'}">
             <property name="vendor.apache.org.filenames" value="Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb" />
         </if>


[28/50] [abbrv] activemq-nms-stomp git commit: fix for: https://issues.apache.org/jira/browse/AMQNET-345

Posted by ta...@apache.org.
fix for: https://issues.apache.org/jira/browse/AMQNET-345


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/5ccb7111
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/5ccb7111
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/5ccb7111

Branch: refs/heads/1.5.x
Commit: 5ccb7111e907e75ec0d3b88b063851dd0782f24e
Parents: b7a52e8
Author: Timothy A. Bish <ta...@apache.org>
Authored: Thu Nov 3 23:46:52 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Thu Nov 3 23:46:52 2011 +0000

----------------------------------------------------------------------
 src/main/csharp/Protocol/StompFrame.cs         | 113 +++++++++++++++++-
 src/main/csharp/Protocol/StompFrameStream.cs   | 124 --------------------
 src/main/csharp/Protocol/StompWireFormat.cs    |  25 ++--
 src/main/csharp/Transport/InactivityMonitor.cs |   3 +-
 4 files changed, 126 insertions(+), 139 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/5ccb7111/src/main/csharp/Protocol/StompFrame.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Protocol/StompFrame.cs b/src/main/csharp/Protocol/StompFrame.cs
index 52ef99b..527f298 100644
--- a/src/main/csharp/Protocol/StompFrame.cs
+++ b/src/main/csharp/Protocol/StompFrame.cs
@@ -33,10 +33,18 @@ namespace Apache.NMS.Stomp.Protocol
         public const byte FRAME_TERMINUS = (byte) 0;
         /// Used to denote a Special KeepAlive command that consists of a single newline.
         public const String KEEPALIVE = "KEEPALIVE";
-        
+
+        public const byte BREAK = (byte)('\n');
+        public const byte COLON = (byte)(':');
+        public const byte ESCAPE = (byte)('\\');
+        public readonly byte[] ESCAPE_ESCAPE_SEQ = new byte[2]{ 92, 92 };
+        public readonly byte[] COLON_ESCAPE_SEQ = new byte[2]{ 92, 99 };
+        public readonly byte[] NEWLINE_ESCAPE_SEQ = new byte[2]{ 92, 110 };
+
         private string command;
         private IDictionary properties = new Hashtable();
         private byte[] content;
+        private bool encodingEnabled;
 
         private readonly Encoding encoding = new UTF8Encoding();
         
@@ -44,10 +52,27 @@ namespace Apache.NMS.Stomp.Protocol
         {
         }
 
+        public StompFrame(bool encodingEnabled)
+        {
+            this.encodingEnabled = encodingEnabled;
+        }
+
         public StompFrame(string command)
         {
             this.command = command;
         }
+
+        public StompFrame(string command, bool encodingEnabled)
+        {
+            this.command = command;
+            this.encodingEnabled = encodingEnabled;
+        }
+
+        public bool EncodingEnabled
+        {
+            get { return this.encodingEnabled; }
+            set { this.encodingEnabled = value; }
+        }
         
         public byte[] Content
         {
@@ -152,7 +177,7 @@ namespace Apache.NMS.Stomp.Protocol
             {
                 builder.Append(key);
                 builder.Append(SEPARATOR);
-                builder.Append(this.Properties[key] as string);
+                builder.Append(EncodeHeader(this.Properties[key] as string));
                 builder.Append(NEWLINE);
             }
 
@@ -205,7 +230,7 @@ namespace Apache.NMS.Stomp.Protocol
                     // to store them all but for now we just throw the rest out.
                     if(!this.properties.Contains(key))
                     {
-                        this.properties[key] = value;
+                        this.properties[key] = DecodeHeader(value);
                     }
                 }
                 else
@@ -267,6 +292,86 @@ namespace Apache.NMS.Stomp.Protocol
             
             byte[] data = ms.ToArray();
             return encoding.GetString(data, 0, data.Length);
-        }        
+        }
+
+        private String EncodeHeader(String header)
+        {
+            String result = header;
+            if(this.encodingEnabled)
+            {
+                byte[] utf8buf = this.encoding.GetBytes(header);
+                MemoryStream stream = new MemoryStream(utf8buf.Length);
+                foreach(byte val in utf8buf)
+                {
+                    switch(val)
+                    {
+                    case ESCAPE:
+                        stream.Write(ESCAPE_ESCAPE_SEQ, 0, ESCAPE_ESCAPE_SEQ.Length);
+                        break;
+                    case BREAK:
+                        stream.Write(NEWLINE_ESCAPE_SEQ, 0, NEWLINE_ESCAPE_SEQ.Length);
+                        break;
+                    case COLON:
+                        stream.Write(COLON_ESCAPE_SEQ, 0, COLON_ESCAPE_SEQ.Length);
+                        break;
+                    default:
+                        stream.WriteByte(val);
+                        break;
+                    }
+                }
+
+                byte[] data = stream.ToArray();
+                result = encoding.GetString(data, 0, data.Length);
+            }
+
+            return result;
+        }
+
+        private String DecodeHeader(String header)
+        {
+            MemoryStream decoded = new MemoryStream();
+
+            int value = -1;
+            byte[] utf8buf = this.encoding.GetBytes(header);
+            MemoryStream stream = new MemoryStream(utf8buf);
+
+            while((value = stream.ReadByte()) != -1)
+            {
+                if(value == 92)
+                {
+                    int next = stream.ReadByte();
+                    if (next != -1)
+                    {
+                        switch(next) {
+                        case 110:
+                            decoded.WriteByte(BREAK);
+                            break;
+                        case 99:
+                            decoded.WriteByte(COLON);
+                            break;
+                        case 92:
+                            decoded.WriteByte(ESCAPE);
+                            break;
+                        default:
+                            stream.Seek(-1, SeekOrigin.Current);
+                            decoded.WriteByte((byte)value);
+                            break;
+                        }
+                    }
+                    else
+                    {
+                        decoded.WriteByte((byte)value);
+                    }
+
+                }
+                else
+                {
+                    decoded.WriteByte((byte)value);
+                }
+            }
+
+            byte[] data = decoded.ToArray();
+            return encoding.GetString(data, 0, data.Length);
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/5ccb7111/src/main/csharp/Protocol/StompFrameStream.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Protocol/StompFrameStream.cs b/src/main/csharp/Protocol/StompFrameStream.cs
deleted file mode 100644
index fcd8fb7..0000000
--- a/src/main/csharp/Protocol/StompFrameStream.cs
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.IO;
-using System.Text;
-
-using Apache.NMS.Stomp.Commands;
-
-namespace Apache.NMS.Stomp.Protocol
-{
-    /// <summary>
-    /// A Stream for writing a <a href="http://stomp.codehaus.org/">STOMP</a> Frame
-    /// </summary>
-    public class StompFrameStream
-    {
-        /// Used to terminate a header line or end of a headers section of the Frame.
-        public const String NEWLINE = "\n";
-        /// Used to seperate the Key / Value pairing in Frame Headers
-        public const String SEPARATOR = ":";
-        /// Used to mark the End of the Frame.
-        public const byte FRAME_TERMINUS = (byte) 0;
-
-        private readonly StringBuilder builder = new StringBuilder();
-        private readonly BinaryWriter ds;
-        private byte[] content;
-        private int contentLength = -1;
-        private readonly Encoding encoding;
-
-        public StompFrameStream(BinaryWriter ds, Encoding encoding)
-        {
-            this.ds = ds;
-            this.encoding = encoding;
-        }
-
-        public byte[] Content
-        {
-            get { return content; }
-            set { content = value; }
-        }
-
-        public int ContentLength
-        {
-            get { return contentLength; }
-            set
-            {
-                contentLength = value;
-                WriteHeader("content-length", contentLength);
-            }
-        }
-
-        public void WriteCommand(Command command, String name)
-        {
-            WriteCommand(command, name, false);
-        }
-
-        public void WriteCommand(Command command, String name, bool ignoreErrors)
-        {
-            builder.Append(name);
-            builder.Append(NEWLINE);
-            if(command.ResponseRequired)
-            {
-                if(ignoreErrors)
-                {
-                    WriteHeader("receipt", "ignore:" + command.CommandId);
-                }
-                else
-                {
-                    WriteHeader("receipt", command.CommandId);
-                }
-            }
-        }
-
-        public void WriteHeader(String name, Object value)
-        {
-            if(value != null)
-            {
-                builder.Append(name);
-                builder.Append(SEPARATOR);
-                builder.Append(value);
-                builder.Append(NEWLINE);
-            }
-        }
-
-        public void WriteHeader(String name, bool value)
-        {
-            if(value)
-            {
-                builder.Append(name);
-                builder.Append(SEPARATOR);
-                builder.Append("true");
-                builder.Append(NEWLINE);
-            }
-        }
-
-        public void Flush()
-        {
-            builder.Append(NEWLINE);
-            ds.Write(encoding.GetBytes(builder.ToString()));
-
-            if (content != null)
-            {
-                ds.Write(content);
-            }
-
-            // Always write a terminating NULL byte to end the content frame.
-            ds.Write(FRAME_TERMINUS);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/5ccb7111/src/main/csharp/Protocol/StompWireFormat.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Protocol/StompWireFormat.cs b/src/main/csharp/Protocol/StompWireFormat.cs
index 6b864f7..bf6e278 100644
--- a/src/main/csharp/Protocol/StompWireFormat.cs
+++ b/src/main/csharp/Protocol/StompWireFormat.cs
@@ -33,6 +33,7 @@ namespace Apache.NMS.Stomp.Protocol
         private ITransport transport;
         private WireFormatInfo remoteWireFormatInfo;
         private int connectedResponseId = -1;
+        private bool encodeHeaders = false;
 
         public StompWireFormat()
         {
@@ -116,7 +117,7 @@ namespace Apache.NMS.Stomp.Protocol
 
         public Object Unmarshal(BinaryReader dataIn)
         {            
-            StompFrame frame = new StompFrame();
+            StompFrame frame = new StompFrame(this.encodeHeaders);
             frame.FromStream(dataIn);
             
             Object answer = CreateCommand(frame);
@@ -197,6 +198,11 @@ namespace Apache.NMS.Stomp.Protocol
             {
                 remoteWireFormatInfo.Version = Single.Parse(frame.RemoveProperty("version"));
 
+                if(remoteWireFormatInfo.Version > 1.0f)
+                {
+                    this.encodeHeaders = true;
+                }
+
                 if(frame.HasProperty("session"))
                 {
                     remoteWireFormatInfo.Session = frame.RemoveProperty("session");
@@ -333,7 +339,7 @@ namespace Apache.NMS.Stomp.Protocol
 
         protected virtual void WriteMessage(Message command, BinaryWriter dataOut)
         {
-            StompFrame frame = new StompFrame("SEND");
+            StompFrame frame = new StompFrame("SEND", encodeHeaders);
             if(command.ResponseRequired)
             {
                 frame.SetProperty("receipt", command.CommandId);
@@ -418,7 +424,7 @@ namespace Apache.NMS.Stomp.Protocol
 
         protected virtual void WriteMessageAck(MessageAck command, BinaryWriter dataOut)
         {
-            StompFrame frame = new StompFrame("ACK");
+            StompFrame frame = new StompFrame("ACK", encodeHeaders);
             if(command.ResponseRequired)
             {
                 frame.SetProperty("receipt", "ignore:" + command.CommandId);
@@ -443,8 +449,7 @@ namespace Apache.NMS.Stomp.Protocol
         protected virtual void WriteConnectionInfo(ConnectionInfo command, BinaryWriter dataOut)
         {
             // lets force a receipt for the Connect Frame.
-            
-            StompFrame frame = new StompFrame("CONNECT");
+            StompFrame frame = new StompFrame("CONNECT", encodeHeaders);
 
             frame.SetProperty("client-id", command.ClientId);
             if(!String.IsNullOrEmpty(command.UserName))
@@ -477,7 +482,7 @@ namespace Apache.NMS.Stomp.Protocol
         {
             System.Diagnostics.Debug.Assert(!command.ResponseRequired);
 
-            StompFrame frame = new StompFrame("DISCONNECT");
+            StompFrame frame = new StompFrame("DISCONNECT", encodeHeaders);
 
             if(Tracer.IsDebugEnabled)
             {
@@ -489,7 +494,7 @@ namespace Apache.NMS.Stomp.Protocol
 
         protected virtual void WriteConsumerInfo(ConsumerInfo command, BinaryWriter dataOut)
         {
-            StompFrame frame = new StompFrame("SUBSCRIBE");
+            StompFrame frame = new StompFrame("SUBSCRIBE", encodeHeaders);
 
             if(command.ResponseRequired)
             {
@@ -552,7 +557,7 @@ namespace Apache.NMS.Stomp.Protocol
 
         protected virtual void WriteKeepAliveInfo(KeepAliveInfo command, BinaryWriter dataOut)
         {
-            StompFrame frame = new StompFrame(StompFrame.KEEPALIVE);
+            StompFrame frame = new StompFrame(StompFrame.KEEPALIVE, encodeHeaders);
 
             if(Tracer.IsDebugEnabled)
             {
@@ -564,7 +569,7 @@ namespace Apache.NMS.Stomp.Protocol
 
         protected virtual void WriteRemoveInfo(RemoveInfo command, BinaryWriter dataOut)
         {
-            StompFrame frame = new StompFrame("UNSUBSCRIBE");
+            StompFrame frame = new StompFrame("UNSUBSCRIBE", encodeHeaders);
             object id = command.ObjectId;
 
             if(id is ConsumerId)
@@ -604,7 +609,7 @@ namespace Apache.NMS.Stomp.Protocol
             Tracer.Debug("StompWireFormat - For transaction type: " + transactionType + 
                          " we are using command type: " + type);
 
-            StompFrame frame = new StompFrame(type);
+            StompFrame frame = new StompFrame(type, encodeHeaders);
             if(command.ResponseRequired)
             {
                 frame.SetProperty("receipt", command.CommandId);

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/5ccb7111/src/main/csharp/Transport/InactivityMonitor.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Transport/InactivityMonitor.cs b/src/main/csharp/Transport/InactivityMonitor.cs
index 1614394..9146693 100644
--- a/src/main/csharp/Transport/InactivityMonitor.cs
+++ b/src/main/csharp/Transport/InactivityMonitor.cs
@@ -335,7 +335,8 @@ namespace Apache.NMS.Stomp.Transport
                     this.asyncWriteTask = new AsyncWriteTask(this);
                 }
 
-                initialDelayTime = localWireFormatInfo.MaxInactivityDurationInitialDelay;
+                initialDelayTime = localWireFormatInfo.MaxInactivityDurationInitialDelay > 0 ?
+                                       localWireFormatInfo.MaxInactivityDurationInitialDelay : writeCheckTime;
 
                 Tracer.DebugFormat("InactivityMonitor[{0}]: Read Check time interval: {1}",
                                    instanceId, readCheckTime );


[03/50] [abbrv] activemq-nms-stomp git commit: Added inclusion of XML documentation files in ZIP package.

Posted by ta...@apache.org.
Added inclusion of XML documentation files in ZIP package.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/47dc8fb7
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/47dc8fb7
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/47dc8fb7

Branch: refs/heads/1.2.x
Commit: 47dc8fb7d06a96801515836aa8a35d8b2c4a0c2e
Parents: 7d932d2
Author: Jim Gomes <jg...@apache.org>
Authored: Fri Feb 12 21:50:23 2010 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Fri Feb 12 21:50:23 2010 +0000

----------------------------------------------------------------------
 package.ps1 | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/47dc8fb7/package.ps1
----------------------------------------------------------------------
diff --git a/package.ps1 b/package.ps1
index 017c3dd..2a1ef63 100644
--- a/package.ps1
+++ b/package.ps1
@@ -39,8 +39,10 @@ if(test-path build)
 		foreach($framework in $frameworks)
 		{
 			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll"
+			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.xml"
 			zip -9 -u "$zipfile" "$framework\$configuration\nmsprovider*.config"
 			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll"
+			zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.xml"
 			if($framework -ieq "mono-2.0")
 			{
 				zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll.mdb"


[31/50] [abbrv] activemq-nms-stomp git commit: Trigger the fault tolerant recovery logic when a connection exception occurs. Fixes [AMQNET-371]. (See https://issues.apache.org/jira/browse/AMQNET-371)

Posted by ta...@apache.org.
Trigger the fault tolerant recovery logic when a connection exception occurs.
Fixes [AMQNET-371]. (See https://issues.apache.org/jira/browse/AMQNET-371)



Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/07cda020
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/07cda020
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/07cda020

Branch: refs/heads/1.5.x
Commit: 07cda020cd8a26bdb1e97c402344a86991140289
Parents: 8e02b74
Author: Jim Gomes <jg...@apache.org>
Authored: Tue Feb 28 23:42:51 2012 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Tue Feb 28 23:42:51 2012 +0000

----------------------------------------------------------------------
 src/main/csharp/Connection.cs | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/07cda020/src/main/csharp/Connection.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index 4ca6aa5..16f664a 100755
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -721,14 +721,27 @@ namespace Apache.NMS.Stomp
 
         internal void OnException(Exception error)
         {
-            // Will fire an exception listener callback if there's any set.
-            OnAsyncException(error);
+            if(this.transport.IsFaultTolerant)
+            {
+                Tracer.ErrorFormat("Attempting recovery from Exception: {0}", error.Message);
+                while(null != (error = error.InnerException))
+                {
+                    Tracer.ErrorFormat("   {0}", error.Message);
+                }
 
-            if(!this.closing.Value && !this.closed.Value)
+                OnTransportInterrupted(this.transport);
+            }
+            else
             {
-                // Perform the actual work in another thread to avoid lock contention
-                // and allow the caller to continue on in its error cleanup.
-                executor.QueueUserWorkItem(AsyncOnExceptionHandler, error);
+                // Will fire an exception listener callback if there's any set.
+                OnAsyncException(error);
+
+                if(!this.closing.Value && !this.closed.Value)
+                {
+                    // Perform the actual work in another thread to avoid lock contention
+                    // and allow the caller to continue on in its error cleanup.
+                    executor.QueueUserWorkItem(AsyncOnExceptionHandler, error);
+                }
             }
         }
 


[22/50] [abbrv] activemq-nms-stomp git commit: Move versioning forward to 1.5.2-SNAPSHOT

Posted by ta...@apache.org.
Move versioning forward to 1.5.2-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/d7ef00e8
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/d7ef00e8
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/d7ef00e8

Branch: refs/heads/1.5.x
Commit: d7ef00e842d9d0bf5491e7467dadcd52c08ece64
Parents: d64215a
Author: Timothy A. Bish <ta...@apache.org>
Authored: Wed Jan 26 23:14:41 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Wed Jan 26 23:14:41 2011 +0000

----------------------------------------------------------------------
 nant.build  | 4 ++--
 package.ps1 | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/d7ef00e8/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 3068a57..087e10f 100644
--- a/nant.build
+++ b/nant.build
@@ -22,7 +22,7 @@
     <property name="basedir" value="${project::get-base-directory()}" />
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
-    <property name="project.version" value="1.5.1" unless="${property::exists('project.version')}" />
+    <property name="project.version" value="1.5.2" unless="${property::exists('project.version')}" />
     <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />
@@ -46,7 +46,7 @@
         <!-- Property grouping for 'vendor.apache.org' -->
         <property name="vendor.apache.org.name" value="Apache.NMS" />
         <property name="vendor.apache.org.group" value="org.apache.activemq" />
-        <property name="vendor.apache.org.version" value="1.5.1" />
+        <property name="vendor.apache.org.version" value="1.5.0" />
         <if test="${current.build.framework == 'mono-2.0'}">
             <property name="vendor.apache.org.filenames" value="Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb" />
         </if>

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/d7ef00e8/package.ps1
----------------------------------------------------------------------
diff --git a/package.ps1 b/package.ps1
index 832b4eb..bfa1448 100644
--- a/package.ps1
+++ b/package.ps1
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 $pkgname = "Apache.NMS.Stomp"
-$pkgver = "1.5.1-SNAPSHOT"
+$pkgver = "1.5.2-SNAPSHOT"
 $configurations = "release", "debug"
 $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0", "netcf-2.0"
 


[05/50] [abbrv] activemq-nms-stomp git commit: Create a new branch for version 1.3.x releases

Posted by ta...@apache.org.
Create a new branch for version 1.3.x releases


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/14e59206
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/14e59206
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/14e59206

Branch: refs/heads/1.3.x
Commit: 14e592065046f98b91bab17da139e6decf0b75a6
Parents: 0d37113
Author: Timothy A. Bish <ta...@apache.org>
Authored: Mon May 24 21:11:12 2010 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Mon May 24 21:11:12 2010 +0000

----------------------------------------------------------------------

----------------------------------------------------------------------



[46/50] [abbrv] activemq-nms-stomp git commit: Branch NMS.Stomp trunk to 1.7.x, using NMS API 1.7.1. Update trunk to 1.8.0.

Posted by ta...@apache.org.
Branch NMS.Stomp trunk to 1.7.x, using NMS API 1.7.1. Update trunk to 1.8.0.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/7cabda22
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/7cabda22
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/7cabda22

Branch: refs/heads/1.7.x
Commit: 7cabda2212bae41e249ad2c5843fd0da5706b433
Parents: 52e49cc
Author: Jim Gomes <jg...@apache.org>
Authored: Tue Jul 7 20:26:21 2015 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Tue Jul 7 20:26:21 2015 +0000

----------------------------------------------------------------------
 nant.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/7cabda22/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 0966e76..5b3a667 100644
--- a/nant.build
+++ b/nant.build
@@ -22,7 +22,7 @@
     <property name="basedir" value="${project::get-base-directory()}" />
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
-    <property name="project.version" value="1.7.0" unless="${property::exists('project.version')}" />
+    <property name="project.version" value="1.7.1" unless="${property::exists('project.version')}" />
     <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />
@@ -46,7 +46,7 @@
         <!-- Property grouping for 'vendor.apache.org' -->
         <property name="vendor.apache.org.name" value="Apache.NMS" />
         <property name="vendor.apache.org.group" value="org.apache.activemq" />
-        <property name="vendor.apache.org.version" value="1.7.0" />
+        <property name="vendor.apache.org.version" value="1.7.1" />
         <if test="${current.build.framework == 'mono-2.0' or current.build.framework == 'mono-4.0'}">
             <property name="vendor.apache.org.filenames" value="Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb" />
         </if>


[42/50] [abbrv] activemq-nms-stomp git commit: bump versions to 1.5.5-SNAPSHOT

Posted by ta...@apache.org.
bump versions to 1.5.5-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/77473f8e
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/77473f8e
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/77473f8e

Branch: refs/heads/1.5.x
Commit: 77473f8ec391a9f61e93969276958c251c3d4404
Parents: 5a67518
Author: Timothy A. Bish <ta...@apache.org>
Authored: Mon Oct 21 15:07:35 2013 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Mon Oct 21 15:07:35 2013 +0000

----------------------------------------------------------------------
 nant.build  | 2 +-
 package.ps1 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/77473f8e/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 176493b..ab0da78 100644
--- a/nant.build
+++ b/nant.build
@@ -22,7 +22,7 @@
     <property name="basedir" value="${project::get-base-directory()}" />
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
-    <property name="project.version" value="1.5.4" unless="${property::exists('project.version')}" />
+    <property name="project.version" value="1.5.5" unless="${property::exists('project.version')}" />
     <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/77473f8e/package.ps1
----------------------------------------------------------------------
diff --git a/package.ps1 b/package.ps1
index 9904fd5..8fc7ba1 100644
--- a/package.ps1
+++ b/package.ps1
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 $pkgname = "Apache.NMS.Stomp"
-$pkgver = "1.5.4-SNAPSHOT"
+$pkgver = "1.5.5-SNAPSHOT"
 $configurations = "release", "debug"
 $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0", "netcf-2.0"
 


[32/50] [abbrv] activemq-nms-stomp git commit: Rolling back changes from previous check-in.

Posted by ta...@apache.org.
Rolling back changes from previous check-in.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/bbe5c99c
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/bbe5c99c
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/bbe5c99c

Branch: refs/heads/1.5.x
Commit: bbe5c99c58e8c411607919ca447c6781980bea6a
Parents: 07cda02
Author: Jim Gomes <jg...@apache.org>
Authored: Wed Feb 29 20:40:13 2012 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Wed Feb 29 20:40:13 2012 +0000

----------------------------------------------------------------------
 src/main/csharp/Connection.cs | 25 ++++++-------------------
 1 file changed, 6 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/bbe5c99c/src/main/csharp/Connection.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index 16f664a..4ca6aa5 100755
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -721,27 +721,14 @@ namespace Apache.NMS.Stomp
 
         internal void OnException(Exception error)
         {
-            if(this.transport.IsFaultTolerant)
-            {
-                Tracer.ErrorFormat("Attempting recovery from Exception: {0}", error.Message);
-                while(null != (error = error.InnerException))
-                {
-                    Tracer.ErrorFormat("   {0}", error.Message);
-                }
+            // Will fire an exception listener callback if there's any set.
+            OnAsyncException(error);
 
-                OnTransportInterrupted(this.transport);
-            }
-            else
+            if(!this.closing.Value && !this.closed.Value)
             {
-                // Will fire an exception listener callback if there's any set.
-                OnAsyncException(error);
-
-                if(!this.closing.Value && !this.closed.Value)
-                {
-                    // Perform the actual work in another thread to avoid lock contention
-                    // and allow the caller to continue on in its error cleanup.
-                    executor.QueueUserWorkItem(AsyncOnExceptionHandler, error);
-                }
+                // Perform the actual work in another thread to avoid lock contention
+                // and allow the caller to continue on in its error cleanup.
+                executor.QueueUserWorkItem(AsyncOnExceptionHandler, error);
             }
         }
 


[25/50] [abbrv] activemq-nms-stomp git commit: Refactor the CheckConnected function to handle multiple threads attempting to check connection status against an offline broker. Guard against unwanted exceptions being thrown when indexing into a connectio

Posted by ta...@apache.org.
Refactor the CheckConnected function to handle multiple threads attempting to check connection status against an offline broker.  Guard against unwanted exceptions being thrown when indexing into a connection state array that has not been fully set up because the broker is offline.

Fixes [AMQNET-331]. (See https://issues.apache.org/jira/browse/AMQNET-331)



Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/3d2d37af
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/3d2d37af
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/3d2d37af

Branch: refs/heads/1.5.x
Commit: 3d2d37af432882cbc44713d46c1acf4cc8208a01
Parents: 67916c2
Author: Jim Gomes <jg...@apache.org>
Authored: Fri Jun 17 23:58:06 2011 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Fri Jun 17 23:58:06 2011 +0000

----------------------------------------------------------------------
 src/main/csharp/Connection.cs                   | 71 +++++++++++++++-----
 src/main/csharp/State/ConnectionState.cs        | 38 +++++------
 src/main/csharp/State/ConnectionStateTracker.cs | 23 ++++---
 src/main/csharp/State/SynchronizedObjects.cs    |  8 +++
 src/main/csharp/Transport/MutexTransport.cs     |  6 +-
 5 files changed, 99 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/3d2d37af/src/main/csharp/Connection.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index ffaf180..4ca6aa5 100755
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -501,14 +501,7 @@ namespace Apache.NMS.Stomp
 
         public Response SyncRequest(Command command)
         {
-            try
-            {
-                return SyncRequest(command, this.RequestTimeout);
-            }
-            catch(Exception ex)
-            {
-                throw NMSExceptionSupport.Create(ex);
-            }
+            return SyncRequest(command, this.RequestTimeout);
         }
 
         public Response SyncRequest(Command command, TimeSpan requestTimeout)
@@ -546,7 +539,13 @@ namespace Apache.NMS.Stomp
             }
         }
 
-        protected void CheckConnected()
+        private object checkConnectedLock = new object();
+
+        /// <summary>
+        /// Check and ensure that the connection objcet is connected.  If it is not
+        /// connected or is closed, a ConnectionClosedException is thrown.
+        /// </summary>
+        internal void CheckConnected()
         {
             if(closed.Value)
             {
@@ -555,17 +554,57 @@ namespace Apache.NMS.Stomp
 
             if(!connected.Value)
             {
-                if(!this.userSpecifiedClientID)
+                DateTime timeoutTime = DateTime.Now + this.RequestTimeout;
+                int waitCount = 1;
+
+                while(true)
                 {
-                    this.info.ClientId = this.clientIdGenerator.GenerateId();
+                    if(Monitor.TryEnter(checkConnectedLock))
+                    {
+                        try
+                        {
+                            if(!connected.Value)
+                            {
+                                if(!this.userSpecifiedClientID)
+                                {
+                                    this.info.ClientId = this.clientIdGenerator.GenerateId();
+                                }
+
+                                try
+                                {
+                                    if(null != transport)
+                                    {
+                                        // Send the connection and see if an ack/nak is returned.
+                                        Response response = transport.Request(this.info, this.RequestTimeout);
+                                        if(!(response is ExceptionResponse))
+                                        {
+                                            connected.Value = true;
+                                        }
+                                    }
+                                }
+                                catch
+                                {
+                                }
+                            }
+                        }
+                        finally
+                        {
+                            Monitor.Exit(checkConnectedLock);
+                        }
+                    }
+
+                    if(connected.Value || DateTime.Now > timeoutTime)
+                    {
+                        break;
+                    }
+
+                    // Back off from being overly aggressive.  Having too many threads
+                    // aggressively trying to connect to a down broker pegs the CPU.
+                    Thread.Sleep(5 * (waitCount++));
                 }
 
-                connected.Value = true;
-                // now lets send the connection and see if we get an ack/nak
-                if(null == SyncRequest(info))
+                if(!connected.Value)
                 {
-                    closed.Value = true;
-                    connected.Value = false;
                     throw new ConnectionClosedException();
                 }
             }

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/3d2d37af/src/main/csharp/State/ConnectionState.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/State/ConnectionState.cs b/src/main/csharp/State/ConnectionState.cs
index d568a47..c39d67f 100644
--- a/src/main/csharp/State/ConnectionState.cs
+++ b/src/main/csharp/State/ConnectionState.cs
@@ -25,8 +25,7 @@ namespace Apache.NMS.Stomp.State
 	{
 
 		ConnectionInfo info;
-		private readonly AtomicDictionary<ConsumerId, ConsumerState> consumers =
-            new AtomicDictionary<ConsumerId, ConsumerState>();
+		private readonly AtomicDictionary<ConsumerId, ConsumerState> consumers = new AtomicDictionary<ConsumerId, ConsumerState>();
 		private readonly Atomic<bool> _shutdown = new Atomic<bool>(false);
 
 		public ConnectionState(ConnectionInfo info)
@@ -49,26 +48,25 @@ namespace Apache.NMS.Stomp.State
 		{
 			get
 			{
-				#if DEBUG
-				try
+				ConsumerState consumerState;
+				
+				if(consumers.TryGetValue(id, out consumerState))
 				{
-				#endif
-					return consumers[id];
-				#if DEBUG
+					return consumerState;
 				}
-				catch(System.Collections.Generic.KeyNotFoundException ex)
+				
+#if DEBUG
+				// Useful for dignosing missing consumer ids
+				string consumerList = string.Empty;
+				foreach(ConsumerId consumerId in consumers.Keys)
 				{
-					// Useful for dignosing missing consumer ids
-					string consumerList = string.Empty;
-					foreach(ConsumerId consumerId in consumers.Keys)
-					{
-						consumerList += consumerId.ToString() + "\n";
-					}
-					System.Diagnostics.Debug.Assert(false,
-						string.Format("Consumer '{0}' did not exist in the consumers collection.\n\nConsumers:-\n{1}", id, consumerList));
-					throw ex;
+					consumerList += consumerId.ToString() + "\n";
 				}
-				#endif
+				
+				System.Diagnostics.Debug.Assert(false,
+					string.Format("Consumer '{0}' did not exist in the consumers collection.\n\nConsumers:-\n{1}", id, consumerList));
+#endif
+				return null;
 			}
 		}
 
@@ -80,7 +78,9 @@ namespace Apache.NMS.Stomp.State
 
 		public ConsumerState removeConsumer(ConsumerId id)
 		{
-			ConsumerState ret = consumers[id];
+			ConsumerState ret = null;
+			
+			consumers.TryGetValue(id, out ret);
 			consumers.Remove(id);
 			return ret;
 		}

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/3d2d37af/src/main/csharp/State/ConnectionStateTracker.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/State/ConnectionStateTracker.cs b/src/main/csharp/State/ConnectionStateTracker.cs
index d9dbc9d..ccf76a8 100644
--- a/src/main/csharp/State/ConnectionStateTracker.cs
+++ b/src/main/csharp/State/ConnectionStateTracker.cs
@@ -31,8 +31,7 @@ namespace Apache.NMS.Stomp.State
 	{
 		private static readonly Tracked TRACKED_RESPONSE_MARKER = new Tracked(null);
 
-		protected Dictionary<ConnectionId, ConnectionState> connectionStates =
-            new Dictionary<ConnectionId, ConnectionState>();
+		protected Dictionary<ConnectionId, ConnectionState> connectionStates = new Dictionary<ConnectionId, ConnectionState>();
 
 		private bool _restoreConsumers = true;
 
@@ -67,10 +66,10 @@ namespace Apache.NMS.Stomp.State
 			{
 				transport.Oneway(connectionState.Info);
 
-                if(RestoreConsumers)
-                {
-                    DoRestoreConsumers(transport, connectionState);
-                }
+				if(RestoreConsumers)
+				{
+					DoRestoreConsumers(transport, connectionState);
+				}
 			}
 		}
 
@@ -97,10 +96,11 @@ namespace Apache.NMS.Stomp.State
 					ConnectionId connectionId = sessionId.ParentId;
 					if(connectionId != null)
 					{
-						ConnectionState cs = connectionStates[connectionId];
-						if(cs != null)
+						ConnectionState cs = null;
+						
+						if(connectionStates.TryGetValue(connectionId, out cs))
 						{
-						    cs.addConsumer(info);
+							cs.addConsumer(info);
 						}
 					}
 				}
@@ -118,8 +118,9 @@ namespace Apache.NMS.Stomp.State
 					ConnectionId connectionId = sessionId.ParentId;
 					if(connectionId != null)
 					{
-						ConnectionState cs = connectionStates[connectionId];
-						if(cs != null)
+						ConnectionState cs = null;
+						
+						if(connectionStates.TryGetValue(connectionId, out cs))
 						{
 							cs.removeConsumer(id);
 						}

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/3d2d37af/src/main/csharp/State/SynchronizedObjects.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/State/SynchronizedObjects.cs b/src/main/csharp/State/SynchronizedObjects.cs
index 24a23a8..2795503 100644
--- a/src/main/csharp/State/SynchronizedObjects.cs
+++ b/src/main/csharp/State/SynchronizedObjects.cs
@@ -177,6 +177,14 @@ namespace Apache.NMS.Stomp.State
 			}
 		}
 
+		public bool TryGetValue(TKey key, out TValue val)
+		{
+			lock(((ICollection) _dictionary).SyncRoot)
+			{
+				return _dictionary.TryGetValue(key, out val);
+			}
+		}
+
 		public AtomicCollection<TKey> Keys
 		{
 			get

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/3d2d37af/src/main/csharp/Transport/MutexTransport.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Transport/MutexTransport.cs b/src/main/csharp/Transport/MutexTransport.cs
index c5cbc31..540addd 100644
--- a/src/main/csharp/Transport/MutexTransport.cs
+++ b/src/main/csharp/Transport/MutexTransport.cs
@@ -20,6 +20,7 @@ using Apache.NMS.Stomp.Commands;
 
 namespace Apache.NMS.Stomp.Transport
 {
+	/// <summary>
 	/// A Transport which guards access to the next transport using a mutex.
 	/// </summary>
 	public class MutexTransport : TransportFilter
@@ -31,6 +32,7 @@ namespace Apache.NMS.Stomp.Transport
 			if(timeout > 0)
 			{
 				DateTime timeoutTime = DateTime.Now + TimeSpan.FromMilliseconds(timeout);
+				int waitCount = 1;
 
 				while(true)
 				{
@@ -44,7 +46,9 @@ namespace Apache.NMS.Stomp.Transport
 						throw new IOException(string.Format("Oneway timed out after {0} milliseconds.", timeout));
 					}
 
-					Thread.Sleep(10);
+					// Back off from being overly aggressive.  Having too many threads
+					// aggressively trying to get the lock pegs the CPU.
+					Thread.Sleep(3 * (waitCount++));
 				}
 			}
 			else


[07/50] [abbrv] activemq-nms-stomp git commit: Branch code for the 1.4 release

Posted by ta...@apache.org.
Branch code for the 1.4 release


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/0b497f19
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/0b497f19
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/0b497f19

Branch: refs/heads/1.4.x
Commit: 0b497f196b92c9ee8a6bf1e0f1ceb3575fdf03fe
Parents: 7c79740
Author: Timothy A. Bish <ta...@apache.org>
Authored: Tue Sep 7 14:18:08 2010 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Tue Sep 7 14:18:08 2010 +0000

----------------------------------------------------------------------

----------------------------------------------------------------------



[40/50] [abbrv] activemq-nms-stomp git commit: Bump to v1.5.4 SNAPSHOT

Posted by ta...@apache.org.
Bump to v1.5.4 SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/5ba89b38
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/5ba89b38
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/5ba89b38

Branch: refs/heads/1.5.x
Commit: 5ba89b383182af93625ca7465755e29fdd11dc77
Parents: ca08c34
Author: Timothy A. Bish <ta...@apache.org>
Authored: Mon Aug 27 12:56:44 2012 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Mon Aug 27 12:56:44 2012 +0000

----------------------------------------------------------------------
 nant.build  | 2 +-
 package.ps1 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/5ba89b38/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 45a29ac..176493b 100644
--- a/nant.build
+++ b/nant.build
@@ -22,7 +22,7 @@
     <property name="basedir" value="${project::get-base-directory()}" />
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
-    <property name="project.version" value="1.5.3" unless="${property::exists('project.version')}" />
+    <property name="project.version" value="1.5.4" unless="${property::exists('project.version')}" />
     <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/5ba89b38/package.ps1
----------------------------------------------------------------------
diff --git a/package.ps1 b/package.ps1
index a0a625b..9904fd5 100644
--- a/package.ps1
+++ b/package.ps1
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 $pkgname = "Apache.NMS.Stomp"
-$pkgver = "1.5.3-SNAPSHOT"
+$pkgver = "1.5.4-SNAPSHOT"
 $configurations = "release", "debug"
 $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0", "netcf-2.0"
 


[50/50] [abbrv] activemq-nms-stomp git commit: Update to package script to 1.8-SNAPSHOT.

Posted by ta...@apache.org.
Update to package script to 1.8-SNAPSHOT.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/4ba60e96
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/4ba60e96
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/4ba60e96

Branch: refs/heads/master
Commit: 4ba60e96c8282ef6779b559d2f720d2f8ba79f73
Parents: 7c891b7
Author: Jim Gomes <jg...@apache.org>
Authored: Fri Dec 11 19:49:19 2015 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Fri Dec 11 19:49:19 2015 +0000

----------------------------------------------------------------------
 package.ps1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/4ba60e96/package.ps1
----------------------------------------------------------------------
diff --git a/package.ps1 b/package.ps1
index dec6a78..b7ba7f2 100644
--- a/package.ps1
+++ b/package.ps1
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 $pkgname = "Apache.NMS.Stomp"
-$pkgver = "1.6-SNAPSHOT"
+$pkgver = "1.8-SNAPSHOT"
 $configurations = "release", "debug"
 $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0", "netcf-2.0"
 


[49/50] [abbrv] activemq-nms-stomp git commit: Update to Apache.NMS 1.7.2.

Posted by ta...@apache.org.
Update to Apache.NMS 1.7.2.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/62709583
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/62709583
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/62709583

Branch: refs/heads/1.7.x
Commit: 62709583077101ef0842f5902a01fc5c0e8503eb
Parents: 35d3fb6
Author: Jim Gomes <jg...@apache.org>
Authored: Fri Dec 11 19:48:37 2015 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Fri Dec 11 19:48:37 2015 +0000

----------------------------------------------------------------------
 nant.build  | 4 ++--
 package.ps1 | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/62709583/nant.build
----------------------------------------------------------------------
diff --git a/nant.build b/nant.build
index 5b3a667..4ed1a32 100644
--- a/nant.build
+++ b/nant.build
@@ -22,7 +22,7 @@
     <property name="basedir" value="${project::get-base-directory()}" />
     <property name="project.name" value="Apache.NMS.Stomp" />
     <property name="project.group" value="org.apache.activemq" />
-    <property name="project.version" value="1.7.1" unless="${property::exists('project.version')}" />
+    <property name="project.version" value="1.7.2" unless="${property::exists('project.version')}" />
     <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />
     <property name="project.short_description" value="Apache NMS for Stomp Class Library" />
     <property name="project.description" value="Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp" />
@@ -46,7 +46,7 @@
         <!-- Property grouping for 'vendor.apache.org' -->
         <property name="vendor.apache.org.name" value="Apache.NMS" />
         <property name="vendor.apache.org.group" value="org.apache.activemq" />
-        <property name="vendor.apache.org.version" value="1.7.1" />
+        <property name="vendor.apache.org.version" value="1.7.2" />
         <if test="${current.build.framework == 'mono-2.0' or current.build.framework == 'mono-4.0'}">
             <property name="vendor.apache.org.filenames" value="Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb" />
         </if>

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/62709583/package.ps1
----------------------------------------------------------------------
diff --git a/package.ps1 b/package.ps1
index dec6a78..8a558e4 100644
--- a/package.ps1
+++ b/package.ps1
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 $pkgname = "Apache.NMS.Stomp"
-$pkgver = "1.6-SNAPSHOT"
+$pkgver = "1.7-SNAPSHOT"
 $configurations = "release", "debug"
 $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0", "netcf-2.0"
 


[35/50] [abbrv] activemq-nms-stomp git commit: Fix compile for .NET-CF 2.0. Fixes https://issues.apache.org/jira/browse/AMQNET-394

Posted by ta...@apache.org.
Fix compile for .NET-CF 2.0.  Fixes https://issues.apache.org/jira/browse/AMQNET-394


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/e15675c1
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/e15675c1
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/e15675c1

Branch: refs/heads/1.5.x
Commit: e15675c137961695510abb87cd6ce259e09b94ed
Parents: fd6ddc4
Author: Jim Gomes <jg...@apache.org>
Authored: Mon Aug 20 18:13:06 2012 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Mon Aug 20 18:13:06 2012 +0000

----------------------------------------------------------------------
 src/main/csharp/Connection.cs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/e15675c1/src/main/csharp/Connection.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index ba3ccd3..45e03ec 100755
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -682,8 +682,10 @@ namespace Apache.NMS.Stomp
                 }
             }
 
-            Tracer.Error("No such consumer active: " + dispatch.ConsumerId);
-            transport.Oneway(new RemoveInfo() { ObjectId = dispatch.ConsumerId });
+            Tracer.Error("No such consumer active: {0}.  Removing...", dispatch.ConsumerId);
+            RemoveInfo info  = new RemoveInfo();
+            info.ObjectId = dispatch.ConsumerId;
+            transport.Oneway(info);
         }
 
         protected void OnTransportException(ITransport sender, Exception exception)


[18/50] [abbrv] activemq-nms-stomp git commit: fix for: https://issues.apache.org/jira/browse/AMQNET-311

Posted by ta...@apache.org.
fix for: https://issues.apache.org/jira/browse/AMQNET-311


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/b615721f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/b615721f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/b615721f

Branch: refs/heads/1.5.x
Commit: b615721fa71b2926aa25b047b5336f5fd0657e76
Parents: 419f24f
Author: Timothy A. Bish <ta...@apache.org>
Authored: Mon Jan 24 16:01:01 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Mon Jan 24 16:01:01 2011 +0000

----------------------------------------------------------------------
 src/main/csharp/Transport/Tcp/SslTransport.cs | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/b615721f/src/main/csharp/Transport/Tcp/SslTransport.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Transport/Tcp/SslTransport.cs b/src/main/csharp/Transport/Tcp/SslTransport.cs
index d1fcf51..bba9c6f 100644
--- a/src/main/csharp/Transport/Tcp/SslTransport.cs
+++ b/src/main/csharp/Transport/Tcp/SslTransport.cs
@@ -244,6 +244,7 @@ namespace Apache.NMS.Stomp.Transport.Tcp
                 }
 
                 X509Store store = new X509Store(name, location);
+                store.Open(OpenFlags.ReadOnly);
                 collection = store.Certificates;
                 store.Close();
             }


[15/50] [abbrv] activemq-nms-stomp git commit: fix for: https://issues.apache.org/jira/browse/AMQNET-309

Posted by ta...@apache.org.
fix for: https://issues.apache.org/jira/browse/AMQNET-309


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/ce876d05
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/ce876d05
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/ce876d05

Branch: refs/heads/1.5.x
Commit: ce876d0555c636b93914f39af8c6a40f57c40b6a
Parents: 196ee4b
Author: Timothy A. Bish <ta...@apache.org>
Authored: Fri Jan 21 22:43:48 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Fri Jan 21 22:43:48 2011 +0000

----------------------------------------------------------------------
 src/main/csharp/Util/MessageDispatchChannel.cs | 22 ++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/ce876d05/src/main/csharp/Util/MessageDispatchChannel.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Util/MessageDispatchChannel.cs b/src/main/csharp/Util/MessageDispatchChannel.cs
index 102b752..d2d33dc 100644
--- a/src/main/csharp/Util/MessageDispatchChannel.cs
+++ b/src/main/csharp/Util/MessageDispatchChannel.cs
@@ -25,11 +25,18 @@ namespace Apache.NMS.Stomp.Util
     public class MessageDispatchChannel
     {
         private readonly Mutex mutex = new Mutex();
-        private readonly ManualResetEvent waiter = new ManualResetEvent(false);
+        private readonly ManualResetEvent wakeAll = new ManualResetEvent(false);
+        private readonly AutoResetEvent waiter = new AutoResetEvent(false);
+        private WaitHandle[] waiters;
         private bool closed;
         private bool running;
         private readonly LinkedList<MessageDispatch> channel = new LinkedList<MessageDispatch>();
 
+        public MessageDispatchChannel()
+        {
+            this.waiters = new WaitHandle[] { this.waiter, this.wakeAll };
+        }
+
         #region Properties
 
         public object SyncRoot
@@ -106,8 +113,7 @@ namespace Apache.NMS.Stomp.Util
                 if(!Closed)
                 {
                     this.running = true;
-                    this.waiter.Set();
-                    this.waiter.Reset();
+                    this.wakeAll.Reset();
                 }
             }
         }
@@ -117,8 +123,7 @@ namespace Apache.NMS.Stomp.Util
             lock(mutex)
             {
                 this.running = false;
-                this.waiter.Set();
-                this.waiter.Reset();
+                this.wakeAll.Set();
             }
         }
 
@@ -132,7 +137,7 @@ namespace Apache.NMS.Stomp.Util
                     this.closed = true;
                 }
 
-                this.waiter.Set();
+                this.wakeAll.Set();
             }
         }
 
@@ -142,7 +147,6 @@ namespace Apache.NMS.Stomp.Util
             {
                 this.channel.AddLast(dispatch);
                 this.waiter.Set();
-                this.waiter.Reset();
             }
         }
 
@@ -152,7 +156,6 @@ namespace Apache.NMS.Stomp.Util
             {
                 this.channel.AddFirst(dispatch);
                 this.waiter.Set();
-                this.waiter.Reset();
             }
         }
 
@@ -166,7 +169,8 @@ namespace Apache.NMS.Stomp.Util
             if( timeout != TimeSpan.Zero && !Closed && ( Empty || !Running ) )
             {
                 this.mutex.ReleaseMutex();
-                this.waiter.WaitOne((int)timeout.TotalMilliseconds, false);
+                this.waiter.Reset();
+                WaitHandle.WaitAny(this.waiters, (int)timeout.TotalMilliseconds, false);
                 this.mutex.WaitOne();
             }
 


[24/50] [abbrv] activemq-nms-stomp git commit: Add support for transport timeout while waiting for mutex lock. Fixes [AMQNET-330]. (See https://issues.apache.org/activemq/browse/AMQNET-330)

Posted by ta...@apache.org.
Add support for transport timeout while waiting for mutex lock.
Fixes [AMQNET-330]. (See https://issues.apache.org/activemq/browse/AMQNET-330)



Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/67916c24
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/67916c24
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/67916c24

Branch: refs/heads/1.5.x
Commit: 67916c249ec3dff2ed1da77849e70d8d9a9fe55e
Parents: 1f46042
Author: Jim Gomes <jg...@apache.org>
Authored: Tue Jun 14 22:36:38 2011 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Tue Jun 14 22:36:38 2011 +0000

----------------------------------------------------------------------
 .../Transport/Failover/FailoverTransport.cs     | 13 ++++-
 src/main/csharp/Transport/ITransport.cs         | 20 ++++++++
 src/main/csharp/Transport/MutexTransport.cs     | 54 +++++++++++++++++---
 src/main/csharp/Transport/Tcp/TcpTransport.cs   | 24 ++++++++-
 src/main/csharp/Transport/TransportFilter.cs    | 20 ++++++++
 vs2008-stomp-test.csproj                        | 14 +++--
 6 files changed, 132 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/67916c24/src/main/csharp/Transport/Failover/FailoverTransport.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Transport/Failover/FailoverTransport.cs b/src/main/csharp/Transport/Failover/FailoverTransport.cs
index 4d4d0ff..12c23af 100644
--- a/src/main/csharp/Transport/Failover/FailoverTransport.cs
+++ b/src/main/csharp/Transport/Failover/FailoverTransport.cs
@@ -55,6 +55,7 @@ namespace Apache.NMS.Stomp.Transport.Failover
         private bool started;
 
         private int timeout = -1;
+		private int asyncTimeout = 45000;
         private int initialReconnectDelay = 10;
         private int maxReconnectDelay = 1000 * 30;
         private int backOffMultiplier = 2;
@@ -217,7 +218,17 @@ namespace Apache.NMS.Stomp.Transport.Failover
 
         #endregion
 
-        public bool IsFaultTolerant
+		/// <summary>
+		/// If doing an asynchronous connect, the milliseconds before timing out if no connection can be made
+		/// </summary>
+		/// <value>The async timeout.</value>
+		public int AsyncTimeout
+		{
+			get { return asyncTimeout; }
+			set { asyncTimeout = value; }
+		}
+
+		public bool IsFaultTolerant
         {
             get { return true; }
         }

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/67916c24/src/main/csharp/Transport/ITransport.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Transport/ITransport.cs b/src/main/csharp/Transport/ITransport.cs
index 2d7f7a7..1e60307 100755
--- a/src/main/csharp/Transport/ITransport.cs
+++ b/src/main/csharp/Transport/ITransport.cs
@@ -70,6 +70,26 @@ namespace Apache.NMS.Stomp.Transport
         /// </summary>
         Object Narrow(Type type);            
 
+		/// <summary>
+		/// Timeout in milliseconds to wait for sending synchronous messages or commands.
+		/// Set to -1 for infinite timeout.
+		/// </summary>
+		int Timeout
+		{
+			get;
+			set;
+		}
+
+		/// <summary>
+		/// Timeout in milliseconds to wait for sending asynchronous messages or commands.
+		/// Set to -1 for infinite timeout.
+		/// </summary>
+		int AsyncTimeout
+		{
+			get;
+			set;
+		}
+
 		CommandHandler Command
 		{
 			get;

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/67916c24/src/main/csharp/Transport/MutexTransport.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Transport/MutexTransport.cs b/src/main/csharp/Transport/MutexTransport.cs
index 7fe6134..c5cbc31 100644
--- a/src/main/csharp/Transport/MutexTransport.cs
+++ b/src/main/csharp/Transport/MutexTransport.cs
@@ -14,44 +14,86 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-using Apache.NMS.Stomp.Commands;
 using System;
+using System.Threading;
+using Apache.NMS.Stomp.Commands;
 
 namespace Apache.NMS.Stomp.Transport
 {
-	/// <summary>
 	/// A Transport which guards access to the next transport using a mutex.
 	/// </summary>
 	public class MutexTransport : TransportFilter
 	{
 		private readonly object transmissionLock = new object();
 
+		private void GetTransmissionLock(int timeout)
+		{
+			if(timeout > 0)
+			{
+				DateTime timeoutTime = DateTime.Now + TimeSpan.FromMilliseconds(timeout);
+
+				while(true)
+				{
+					if(Monitor.TryEnter(transmissionLock))
+					{
+						break;
+					}
+
+					if(DateTime.Now > timeoutTime)
+					{
+						throw new IOException(string.Format("Oneway timed out after {0} milliseconds.", timeout));
+					}
+
+					Thread.Sleep(10);
+				}
+			}
+			else
+			{
+				Monitor.Enter(transmissionLock);
+			}
+		}
+
 		public MutexTransport(ITransport next) : base(next)
 		{
 		}
 
 		public override void Oneway(Command command)
 		{
-			lock(transmissionLock)
+			GetTransmissionLock(this.next.Timeout);
+			try
+			{
+				base.Oneway(command);
+			}
+			finally
 			{
-				this.next.Oneway(command);
+				Monitor.Exit(transmissionLock);
 			}
 		}
 
 		public override FutureResponse AsyncRequest(Command command)
 		{
-			lock(transmissionLock)
+			GetTransmissionLock(this.next.AsyncTimeout);
+			try
 			{
 				return base.AsyncRequest(command);
 			}
+			finally
+			{
+				Monitor.Exit(transmissionLock);
+			}
 		}
 
 		public override Response Request(Command command, TimeSpan timeout)
 		{
-			lock(transmissionLock)
+			GetTransmissionLock((int) timeout.TotalMilliseconds);
+			try
 			{
 				return base.Request(command, timeout);
 			}
+			finally
+			{
+				Monitor.Exit(transmissionLock);
+			}
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/67916c24/src/main/csharp/Transport/Tcp/TcpTransport.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Transport/Tcp/TcpTransport.cs b/src/main/csharp/Transport/Tcp/TcpTransport.cs
index cc955dc..0c9b6bc 100644
--- a/src/main/csharp/Transport/Tcp/TcpTransport.cs
+++ b/src/main/csharp/Transport/Tcp/TcpTransport.cs
@@ -40,6 +40,8 @@ namespace Apache.NMS.Stomp.Transport.Tcp
         private readonly Atomic<bool> closed = new Atomic<bool>(false);
         private volatile bool seenShutdown;
         private readonly Uri connectedUri;
+		private int timeout = -1;
+		private int asynctimeout = -1;
 
         private CommandHandler commandHandler;
         private ExceptionHandler exceptionHandler;
@@ -314,7 +316,27 @@ namespace Apache.NMS.Stomp.Transport.Tcp
 
         // Implementation methods
 
-        public CommandHandler Command
+		/// <summary>
+		/// Timeout in milliseconds to wait for sending synchronous messages or commands.
+		/// Set to -1 for infinite timeout.
+		/// </summary>
+		public int Timeout
+		{
+			get { return this.timeout; }
+			set { this.timeout = value; }
+		}
+
+		/// <summary>
+		/// Timeout in milliseconds to wait for sending asynchronous messages or commands.
+		/// Set to -1 for infinite timeout.
+		/// </summary>
+		public int AsyncTimeout
+		{
+			get { return this.asynctimeout; }
+			set { this.asynctimeout = value; }
+		}
+
+		public CommandHandler Command
         {
             get { return commandHandler; }
             set { this.commandHandler = value; }

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/67916c24/src/main/csharp/Transport/TransportFilter.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Transport/TransportFilter.cs b/src/main/csharp/Transport/TransportFilter.cs
index 9c4bdbd..0c5c01c 100644
--- a/src/main/csharp/Transport/TransportFilter.cs
+++ b/src/main/csharp/Transport/TransportFilter.cs
@@ -206,6 +206,26 @@ namespace Apache.NMS.Stomp.Transport
             return null;
         }
         
+		/// <summary>
+		/// Timeout in milliseconds to wait for sending synchronous messages or commands.
+		/// Set to -1 for infinite timeout.
+		/// </summary>
+		public int Timeout
+		{
+			get { return next.Timeout; }
+			set { next.Timeout = value; }
+		}
+
+		/// <summary>
+		/// Timeout in milliseconds to wait for sending asynchronous messages or commands.
+		/// Set to -1 for infinite timeout.
+		/// </summary>
+		public int AsyncTimeout
+		{
+			get { return next.AsyncTimeout; }
+			set { next.AsyncTimeout = value; }
+		}
+		
         public bool IsFaultTolerant
         {
             get{ return next.IsFaultTolerant; }

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/67916c24/vs2008-stomp-test.csproj
----------------------------------------------------------------------
diff --git a/vs2008-stomp-test.csproj b/vs2008-stomp-test.csproj
index ffb03ae..ec42a91 100644
--- a/vs2008-stomp-test.csproj
+++ b/vs2008-stomp-test.csproj
@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.21022</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{E8C995C3-FF81-491B-A3B7-9D7C753BDDC3}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -55,16 +55,20 @@
     <NoWarn>3016</NoWarn>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="Apache.NMS, Version=1.5.1.2341, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>lib\Apache.NMS\net-2.0\Apache.NMS.dll</HintPath>
+    </Reference>
+    <Reference Include="Apache.NMS.Test, Version=1.5.1.2341, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>lib\Apache.NMS\net-2.0\Apache.NMS.Test.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Xml" />
     <Reference Include="nunit.framework, Version=2.5.5.10112, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>lib\NUnit\mono-2.0\nunit.framework.dll</HintPath>
     </Reference>
-    <Reference Include="Apache.NMS.Test, Version=1.4.0.2071, Culture=neutral, PublicKeyToken=82756feee3957618">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>lib\Apache.NMS\mono-2.0\Apache.NMS.Test.dll</HintPath>
-    </Reference>
   </ItemGroup>
   <ItemGroup>
     <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">


[11/50] [abbrv] activemq-nms-stomp git commit: https://issues.apache.org/activemq/browse/AMQNET-281

Posted by ta...@apache.org.
https://issues.apache.org/activemq/browse/AMQNET-281

Fix error in CreateSession URI parsing


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/4a6b1b48
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/4a6b1b48
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/4a6b1b48

Branch: refs/heads/1.4.x
Commit: 4a6b1b481a2e68a9d3d8a06a9a77111d122455c9
Parents: e7bba28
Author: Timothy A. Bish <ta...@apache.org>
Authored: Thu Sep 23 20:06:46 2010 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Thu Sep 23 20:06:46 2010 +0000

----------------------------------------------------------------------
 src/main/csharp/Connection.cs | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/4a6b1b48/src/main/csharp/Connection.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index 75aa5ed..00840bc 100755
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -359,9 +359,15 @@ namespace Apache.NMS.Stomp
             Session session = new Session(this, info, sessionAcknowledgementMode, this.dispatchAsync);
 
             // Set properties on session using parameters prefixed with "session."
-            StringDictionary options = URISupport.ParseQuery(this.brokerUri.Query);
-            options = URISupport.GetProperties(options, "session.");
-            URISupport.SetProperties(session, options);
+            if(!String.IsNullOrEmpty(brokerUri.Query) && !brokerUri.OriginalString.EndsWith(")"))
+            {
+                // Since the Uri class will return the end of a Query string found in a Composite
+                // URI we must ensure that we trim that off before we proceed.
+                string query = brokerUri.Query.Substring(brokerUri.Query.LastIndexOf(")") + 1);
+                StringDictionary options = URISupport.ParseQuery(query);
+                options = URISupport.GetProperties(options, "session.");
+                URISupport.SetProperties(session, options);
+            }
 
             session.ConsumerTransformer = this.ConsumerTransformer;
             session.ProducerTransformer = this.ProducerTransformer;


[26/50] [abbrv] activemq-nms-stomp git commit: Added command-line option to skip downloading dependent libraries. This gives greater flexibility for debugging with special libraries.

Posted by ta...@apache.org.
Added command-line option to skip downloading dependent libraries.  This gives greater flexibility for debugging with special libraries.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/179185b8
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/179185b8
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/179185b8

Branch: refs/heads/1.5.x
Commit: 179185b8d3f0dd76fc4ab89992c315ef9b5cbc18
Parents: 3d2d37a
Author: Jim Gomes <jg...@apache.org>
Authored: Thu Sep 1 22:21:25 2011 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Thu Sep 1 22:21:25 2011 +0000

----------------------------------------------------------------------
 nant-common.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/179185b8/nant-common.xml
----------------------------------------------------------------------
diff --git a/nant-common.xml b/nant-common.xml
index 06b5251..5fcad45 100644
--- a/nant-common.xml
+++ b/nant-common.xml
@@ -40,6 +40,7 @@
     <property name="build.noskip"            value="false" />
     <property name="build.skip"              value="false" />
     <property name="build.skip.release"      value="false" unless="${property::exists('build.skip.release')}" />
+    <property name="download.skip"           value="false" unless="${property::exists('download.skip')}"/>
     <property name="compile.skip"            value="false" unless="${property::exists('compile.skip')}" />
     <property name="current.build.config"    value="${if(project.release.type == 'release', 'release', 'debug')}" overwrite="false" />
     <property name="current.build.framework" value="${framework::get-target-framework()}" overwrite="false" />
@@ -416,7 +417,7 @@
     <target name="download-vendor" depends="vendor-init, conditional-download"
                 description="Download the vendor artifacts from the nant repo" />
 
-    <target name="conditional-download" unless="${build.skip}"
+    <target name="conditional-download" unless="${build.skip or download.skip}"
                 description="Download the artifacts from the nant repo">
         <!-- Iterate over the defined vendor filesets. -->
         <foreach item="String" in="${vendor.fileset.names}" delim="," property="current.vendor">


[20/50] [abbrv] activemq-nms-stomp git commit: Merge all fixes from trunk in preparation for a v1.5.1 release.

Posted by ta...@apache.org.
Merge all fixes from trunk in preparation for a v1.5.1 release.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/c0368061
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/c0368061
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/c0368061

Branch: refs/heads/1.5.x
Commit: c0368061e8b6bfa688406f27b2d55026832bdc51
Parents: 4d2a816
Author: Timothy A. Bish <ta...@apache.org>
Authored: Wed Jan 26 21:25:30 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Wed Jan 26 21:25:30 2011 +0000

----------------------------------------------------------------------
 src/main/csharp/Connection.cs                   | 145 ++++++++++---
 src/main/csharp/Threads/ThreadPoolExecutor.cs   | 167 +++++++++++++++
 src/main/csharp/Transport/InactivityMonitor.cs  |  49 +++--
 src/main/csharp/Util/MessageDispatchChannel.cs  |  21 +-
 .../csharp/Threads/ThreadPoolExecutorTest.cs    | 202 +++++++++++++++++++
 vs2008-stomp-test.csproj                        |   1 +
 vs2008-stomp.csproj                             |   1 +
 7 files changed, 534 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/c0368061/src/main/csharp/Connection.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index 6ce7003..ffaf180 100755
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -20,6 +20,7 @@ using System.Collections;
 using System.Collections.Specialized;
 using System.Threading;
 using Apache.NMS.Stomp.Commands;
+using Apache.NMS.Stomp.Threads;
 using Apache.NMS.Stomp.Transport;
 using Apache.NMS.Stomp.Util;
 using Apache.NMS.Util;
@@ -52,9 +53,11 @@ namespace Apache.NMS.Stomp
         private readonly IList sessions = ArrayList.Synchronized(new ArrayList());
         private readonly IDictionary dispatchers = Hashtable.Synchronized(new Hashtable());
         private readonly object myLock = new object();
-        private bool connected = false;
-        private bool closed = false;
-        private bool closing = false;
+        private readonly Atomic<bool> connected = new Atomic<bool>(false);
+        private readonly Atomic<bool> closed = new Atomic<bool>(false);
+        private readonly Atomic<bool> closing = new Atomic<bool>(false);
+        private readonly Atomic<bool> transportFailed = new Atomic<bool>(false);
+        private Exception firstFailureError = null;
         private int sessionCounter = 0;
         private int temporaryDestinationCounter = 0;
         private int localTransactionCounter;
@@ -64,6 +67,7 @@ namespace Apache.NMS.Stomp
         private readonly IdGenerator clientIdGenerator;
         private CountDownLatch transportInterruptionProcessingComplete;
         private readonly MessageTransformation messageTransformation;
+        private readonly ThreadPoolExecutor executor = new ThreadPoolExecutor();
 
         public Connection(Uri connectionUri, ITransport transport, IdGenerator clientIdGenerator)
         {
@@ -72,7 +76,7 @@ namespace Apache.NMS.Stomp
 
             this.transport = transport;
             this.transport.Command = new CommandHandler(OnCommand);
-            this.transport.Exception = new ExceptionHandler(OnException);
+            this.transport.Exception = new ExceptionHandler(OnTransportException);
             this.transport.Interrupted = new InterruptedHandler(OnTransportInterrupted);
             this.transport.Resumed = new ResumedHandler(OnTransportResumed);
 
@@ -215,6 +219,16 @@ namespace Apache.NMS.Stomp
             set { this.transport = value; }
         }
 
+        public bool TransportFailed
+        {
+            get { return this.transportFailed.Value; }
+        }
+
+        public Exception FirstFailureError
+        {
+            get { return this.firstFailureError; }
+        }
+
         public TimeSpan RequestTimeout
         {
             get { return this.requestTimeout; }
@@ -232,7 +246,7 @@ namespace Apache.NMS.Stomp
             get { return info.ClientId; }
             set
             {
-                if(this.connected)
+                if(this.connected.Value)
                 {
                     throw new NMSException("You cannot change the ClientId once the Connection is connected");
                 }
@@ -384,7 +398,7 @@ namespace Apache.NMS.Stomp
 
         internal void RemoveSession(Session session)
         {
-            if(!this.closing)
+            if(!this.closing.Value)
             {
                 sessions.Remove(session);
             }
@@ -404,7 +418,7 @@ namespace Apache.NMS.Stomp
         {
             lock(myLock)
             {
-                if(this.closed)
+                if(this.closed.Value)
                 {
                     return;
                 }
@@ -412,7 +426,7 @@ namespace Apache.NMS.Stomp
                 try
                 {
                     Tracer.Info("Closing Connection.");
-                    this.closing = true;
+                    this.closing.Value = true;
                     lock(sessions.SyncRoot)
                     {
                         foreach(Session session in sessions)
@@ -422,7 +436,7 @@ namespace Apache.NMS.Stomp
                     }
                     sessions.Clear();
 
-                    if(connected)
+                    if(connected.Value)
                     {
                         ShutdownInfo shutdowninfo = new ShutdownInfo();
                         transport.Oneway(shutdowninfo);
@@ -438,9 +452,9 @@ namespace Apache.NMS.Stomp
                 finally
                 {
                     this.transport = null;
-                    this.closed = true;
-                    this.connected = false;
-                    this.closing = false;
+                    this.closed.Value = true;
+                    this.connected.Value = false;
+                    this.closing.Value = false;
                 }
             }
         }
@@ -534,24 +548,24 @@ namespace Apache.NMS.Stomp
 
         protected void CheckConnected()
         {
-            if(closed)
+            if(closed.Value)
             {
                 throw new ConnectionClosedException();
             }
 
-            if(!connected)
+            if(!connected.Value)
             {
                 if(!this.userSpecifiedClientID)
                 {
                     this.info.ClientId = this.clientIdGenerator.GenerateId();
                 }
 
-                connected = true;
+                connected.Value = true;
                 // now lets send the connection and see if we get an ack/nak
                 if(null == SyncRequest(info))
                 {
-                    closed = true;
-                    connected = false;
+                    closed.Value = true;
+                    connected.Value = false;
                     throw new ConnectionClosedException();
                 }
             }
@@ -581,7 +595,7 @@ namespace Apache.NMS.Stomp
             }
             else if(command.IsErrorCommand)
             {
-                if(!closing && !closed)
+                if(!closing.Value && !closed.Value)
                 {
                     ConnectionError connectionError = (ConnectionError) command;
                     BrokerError brokerError = connectionError.Exception;
@@ -597,7 +611,7 @@ namespace Apache.NMS.Stomp
                         }
                     }
 
-                    OnException(commandTransport, new NMSConnectionException(message, cause));
+                    OnException(new NMSConnectionException(message, cause));
                 }
             }
             else
@@ -632,17 +646,85 @@ namespace Apache.NMS.Stomp
             Tracer.Error("No such consumer active: " + dispatch.ConsumerId);
         }
 
-        protected void OnException(ITransport sender, Exception exception)
+        protected void OnTransportException(ITransport sender, Exception exception)
+        {
+            this.OnException(exception);
+        }
+
+        internal void OnAsyncException(Exception error)
+        {
+            if(!this.closed.Value && !this.closing.Value)
+            {
+                if(this.ExceptionListener != null)
+                {
+                    if(!(error is NMSException))
+                    {
+                        error = NMSExceptionSupport.Create(error);
+                    }
+                    NMSException e = (NMSException)error;
+
+                    // Called in another thread so that processing can continue
+                    // here, ensures no lock contention.
+                    executor.QueueUserWorkItem(AsyncCallExceptionListener, e);
+                }
+                else
+                {
+                    Tracer.Debug("Async exception with no exception listener: " + error);
+                }
+            }
+        }
+
+        private void AsyncCallExceptionListener(object error)
+        {
+            NMSException exception = error as NMSException;
+            this.ExceptionListener(exception);
+        }
+
+        internal void OnException(Exception error)
+        {
+            // Will fire an exception listener callback if there's any set.
+            OnAsyncException(error);
+
+            if(!this.closing.Value && !this.closed.Value)
+            {
+                // Perform the actual work in another thread to avoid lock contention
+                // and allow the caller to continue on in its error cleanup.
+                executor.QueueUserWorkItem(AsyncOnExceptionHandler, error);
+            }
+        }
+
+        private void AsyncOnExceptionHandler(object error)
         {
-            if(ExceptionListener != null && !this.closing)
+            Exception cause = error as Exception;
+
+            MarkTransportFailed(cause);
+
+            try
+            {
+                this.transport.Dispose();
+            }
+            catch(Exception ex)
+            {
+                Tracer.Debug("Caught Exception While disposing of Transport: " + ex);
+            }
+
+            IList sessionsCopy = null;
+            lock(this.sessions.SyncRoot)
+            {
+                sessionsCopy = new ArrayList(this.sessions);
+            }
+
+            // Use a copy so we don't concurrently modify the Sessions list if the
+            // client is closing at the same time.
+            foreach(Session session in sessionsCopy)
             {
                 try
                 {
-                    ExceptionListener(exception);
+                    session.Dispose();
                 }
-                catch
+                catch(Exception ex)
                 {
-                    sender.Dispose();
+                    Tracer.Debug("Caught Exception While disposing of Sessions: " + ex);
                 }
             }
         }
@@ -662,7 +744,7 @@ namespace Apache.NMS.Stomp
                 session.ClearMessagesInProgress();
             }
 
-            if(this.ConnectionInterruptedListener != null && !this.closing)
+            if(this.ConnectionInterruptedListener != null && !this.closing.Value)
             {
                 try
                 {
@@ -678,7 +760,7 @@ namespace Apache.NMS.Stomp
         {
             Tracer.Debug("Transport has resumed normal operation.");
 
-            if(this.ConnectionResumedListener != null && !this.closing)
+            if(this.ConnectionResumedListener != null && !this.closing.Value)
             {
                 try
                 {
@@ -705,6 +787,15 @@ namespace Apache.NMS.Stomp
             }
         }
 
+        private void MarkTransportFailed(Exception error)
+        {
+            this.transportFailed.Value = true;
+            if(this.firstFailureError == null)
+            {
+                this.firstFailureError = error;
+            }
+        }
+
         /// <summary>
         /// Creates a new temporary destination name
         /// </summary>
@@ -739,7 +830,7 @@ namespace Apache.NMS.Stomp
             CountDownLatch cdl = this.transportInterruptionProcessingComplete;
             if(cdl != null)
             {
-                if(!closed && cdl.Remaining > 0)
+                if(!closed.Value && cdl.Remaining > 0)
                 {
                     Tracer.Warn("dispatch paused, waiting for outstanding dispatch interruption " +
                                 "processing (" + cdl.Remaining + ") to complete..");

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/c0368061/src/main/csharp/Threads/ThreadPoolExecutor.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Threads/ThreadPoolExecutor.cs b/src/main/csharp/Threads/ThreadPoolExecutor.cs
new file mode 100644
index 0000000..7072dfe
--- /dev/null
+++ b/src/main/csharp/Threads/ThreadPoolExecutor.cs
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading;
+
+namespace Apache.NMS.Stomp.Threads
+{
+    /// <summary>
+    /// This class provides a wrapper around the ThreadPool mechanism in .NET
+    /// to allow for serial execution of jobs in the ThreadPool and provide
+    /// a means of shutting down the execution of jobs in a deterministic
+    /// way.
+    /// </summary>
+    public class ThreadPoolExecutor
+    {
+        private Queue<Future> workQueue = new Queue<Future>();
+        private Mutex syncRoot = new Mutex();
+        private bool running = false;
+        private bool closing = false;
+        private bool closed = false;
+        private ManualResetEvent executionComplete = new ManualResetEvent(true);
+
+        /// <summary>
+        /// Represents an asynchronous task that is executed on the ThreadPool
+        /// at some point in the future.
+        /// </summary>
+        internal class Future
+        {
+            private WaitCallback callback;
+            private object callbackArg;
+
+            public Future(WaitCallback callback, object arg)
+            {
+                this.callback = callback;
+                this.callbackArg = arg;
+            }
+
+            public void Run()
+            {
+                if(this.callback == null)
+                {
+                    throw new Exception("Future executed with null WaitCallback");
+                }
+
+                try
+                {
+                    this.callback(callbackArg);
+                }
+                catch
+                {
+                }
+            }
+        }
+
+        public void QueueUserWorkItem(WaitCallback worker)
+        {
+            this.QueueUserWorkItem(worker, null);
+        }
+
+        public void QueueUserWorkItem(WaitCallback worker, object arg)
+        {
+            if(worker == null)
+            {
+                throw new ArgumentNullException("Invalid WaitCallback passed");
+            }
+
+            if(!this.closed)
+            {
+                lock(syncRoot)
+                {
+                    if(!this.closed || !this.closing)
+                    {
+                        this.workQueue.Enqueue(new Future(worker, arg));
+
+                        if(!this.running)
+                        {
+                            this.executionComplete.Reset();
+                            this.running = true;
+                            ThreadPool.QueueUserWorkItem(new WaitCallback(QueueProcessor), null);
+                        }
+                    }
+                }
+            }
+        }
+
+        public bool IsShutdown
+        {
+            get { return this.closed; }
+        }
+
+        public void Shutdown()
+        {
+            if(!this.closed)
+            {
+                syncRoot.WaitOne();
+
+                if(!this.closed)
+                {
+                    this.closing = true;
+                    this.workQueue.Clear();
+
+                    if(this.running)
+                    {
+                        syncRoot.ReleaseMutex();
+                        this.executionComplete.WaitOne();
+                        syncRoot.WaitOne();
+                    }
+
+                    this.closed = true;
+                }
+
+                syncRoot.ReleaseMutex();
+            }
+        }
+
+        private void QueueProcessor(object unused)
+        {
+            Future theTask = null;
+
+            lock(syncRoot)
+            {
+                if(this.workQueue.Count == 0 || this.closing)
+                {
+                    this.running = false;
+                    this.executionComplete.Set();
+                    return;
+                }
+
+                theTask = this.workQueue.Dequeue();
+            }
+
+            try
+            {
+                theTask.Run();
+            }
+            finally
+            {
+                if(this.closing)
+                {
+                    this.running = false;
+                    this.executionComplete.Set();
+                }
+                else
+                {
+                    ThreadPool.QueueUserWorkItem(new WaitCallback(QueueProcessor), null);
+                }
+            }
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/c0368061/src/main/csharp/Transport/InactivityMonitor.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Transport/InactivityMonitor.cs b/src/main/csharp/Transport/InactivityMonitor.cs
index 8fb5c95..1614394 100644
--- a/src/main/csharp/Transport/InactivityMonitor.cs
+++ b/src/main/csharp/Transport/InactivityMonitor.cs
@@ -45,6 +45,9 @@ namespace Apache.NMS.Stomp.Transport
         private AsyncWriteTask asyncWriteTask;
 
         private readonly Mutex monitor = new Mutex();
+
+        private static int id = 0;
+        private readonly int instanceId = 0;
         private bool disposing = false;
 
         private Timer connectionCheckTimer;
@@ -83,7 +86,8 @@ namespace Apache.NMS.Stomp.Transport
         public InactivityMonitor(ITransport next)
             : base(next)
         {
-            Tracer.Debug("Creating Inactivity Monitor");
+            this.instanceId = ++id;
+            Tracer.Debug("Creating Inactivity Monitor: " + instanceId);
         }
 
         ~InactivityMonitor()
@@ -98,8 +102,14 @@ namespace Apache.NMS.Stomp.Transport
                 // get rid of unmanaged stuff
             }
 
-            this.disposing = true;
-            StopMonitorThreads();
+            lock(monitor)
+            {
+                this.localWireFormatInfo = null;
+                this.remoteWireFormatInfo = null;
+                this.disposing = true;
+                StopMonitorThreads();
+            }
+
             base.Dispose(disposing);
         }
 
@@ -123,19 +133,19 @@ namespace Apache.NMS.Stomp.Transport
         {
             if(this.inWrite.Value || this.failed.Value)
             {
-                Tracer.Debug("Inactivity Monitor is in write or already failed.");
+                Tracer.DebugFormat("InactivityMonitor[{0}]: is in write or already failed.", instanceId);
                 return;
             }
 
             if(!commandSent.Value)
             {
-                //Tracer.Debug("No Message sent since last write check. Sending a KeepAliveInfo");
+                Tracer.DebugFormat("InactivityMonitor[{0}]: No Message sent since last write check. Sending a KeepAliveInfo.", instanceId);
                 this.asyncWriteTask.IsPending = true;
                 this.asyncTasks.Wakeup();
             }
             else
             {
-                Tracer.Debug("Message sent since last write check. Resetting flag");
+                Tracer.DebugFormat("InactivityMonitor[{0}]: Message sent since last write check. Resetting flag.", instanceId);
             }
 
             commandSent.Value = false;
@@ -150,6 +160,7 @@ namespace Apache.NMS.Stomp.Transport
 
             if(!AllowReadCheck(elapsed))
             {
+                Tracer.Debug("InactivityMonitor["+ instanceId +"]: A read check is not currently allowed.");
                 return;
             }
 
@@ -157,12 +168,13 @@ namespace Apache.NMS.Stomp.Transport
 
             if(this.inRead.Value || this.failed.Value || this.asyncErrorTask == null)
             {
+                Tracer.DebugFormat("InactivityMonitor[{0}]: A receive is in progress or already failed.", instanceId);
                 return;
             }
 
             if(!commandReceived.Value)
             {
-                Tracer.Debug("No message received since last read check! Sending an InactivityException!");
+                Tracer.DebugFormat("InactivityMonitor[{0}]: No message received since last read check! Sending an InactivityException!", instanceId);
                 this.asyncErrorTask.IsPending = true;
                 this.asyncTasks.Wakeup();
             }
@@ -215,9 +227,9 @@ namespace Apache.NMS.Stomp.Transport
                 {
                     if(Tracer.IsDebugEnabled)
                     {
-                        Tracer.Debug("InactivityMonitor: New Keep Alive Received at -> " +
-                                     DateTime.Now.ToLongTimeString().TrimEnd(" APM".ToCharArray()) +
-                                     "." + DateTime.Now.Millisecond);
+                        Tracer.DebugFormat("InactivityMonitor[{0}]: New Keep Alive Received at -> " +
+                                           DateTime.Now.ToLongTimeString().TrimEnd(" APM".ToCharArray()) +
+                                           "." + DateTime.Now.Millisecond, instanceId);
                     }
                 }
 
@@ -325,27 +337,29 @@ namespace Apache.NMS.Stomp.Transport
 
                 initialDelayTime = localWireFormatInfo.MaxInactivityDurationInitialDelay;
 
-                Tracer.DebugFormat("Inactivity: Read Check time interval: {0}", readCheckTime );
-                Tracer.DebugFormat("Inactivity: Initial Delay time interval: {0}", initialDelayTime );
-                Tracer.DebugFormat("Inactivity: Write Check time interval: {0}", writeCheckTime );
+                Tracer.DebugFormat("InactivityMonitor[{0}]: Read Check time interval: {1}",
+                                   instanceId, readCheckTime );
+                Tracer.DebugFormat("InactivityMonitor[{0}]: Initial Delay time interval: {1}",
+                                   instanceId, initialDelayTime );
 
                 this.asyncTasks = new CompositeTaskRunner();
 
                 if(this.asyncErrorTask != null)
                 {
-                    Tracer.Debug("Inactivity: Adding the Async Read Check Task to the Runner.");
+                    Tracer.DebugFormat("InactivityMonitor[{0}]: Adding the Async Read Check Task to the Runner.", instanceId);
                     this.asyncTasks.AddTask(this.asyncErrorTask);
                 }
 
                 if(this.asyncWriteTask != null)
                 {
-                    Tracer.Debug("Inactivity: Adding the Async Write Check Task to the Runner.");
+                    Tracer.DebugFormat("InactivityMonitor[{0}]: Write Check time interval: {1}",
+                                       instanceId, writeCheckTime );
                     this.asyncTasks.AddTask(this.asyncWriteTask);
                 }
 
                 if(this.asyncErrorTask != null || this.asyncWriteTask != null)
                 {
-                    Tracer.Debug("Inactivity: Starting the Monitor Timer.");
+                    Tracer.DebugFormat("InactivityMonitor[{0}]: Starting the Monitor Timer.", instanceId);
                     monitorStarted.Value = true;
 
                     this.connectionCheckTimer = new Timer(
@@ -427,10 +441,13 @@ namespace Apache.NMS.Stomp.Transport
 
             public bool Iterate()
             {
+                Tracer.DebugFormat("InactivityMonitor[{0}] perparing for another Write Check", parent.instanceId);
                 if(this.pending.CompareAndSet(true, false) && this.parent.monitorStarted.Value)
                 {
                     try
                     {
+                        Tracer.DebugFormat("InactivityMonitor[{0}] Write Check required sending KeepAlive.",
+                                           parent.instanceId);
                         KeepAliveInfo info = new KeepAliveInfo();
                         this.parent.next.Oneway(info);
                     }

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/c0368061/src/main/csharp/Util/MessageDispatchChannel.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Util/MessageDispatchChannel.cs b/src/main/csharp/Util/MessageDispatchChannel.cs
index a1d7cfc..64bd7aa 100644
--- a/src/main/csharp/Util/MessageDispatchChannel.cs
+++ b/src/main/csharp/Util/MessageDispatchChannel.cs
@@ -25,16 +25,13 @@ namespace Apache.NMS.Stomp.Util
     public class MessageDispatchChannel
     {
         private readonly Mutex mutex = new Mutex();
-        private readonly ManualResetEvent wakeAll = new ManualResetEvent(false);
-        private readonly AutoResetEvent waiter = new AutoResetEvent(false);
-        private WaitHandle[] waiters;
+        private readonly ManualResetEvent waiter = new ManualResetEvent(false);
         private bool closed;
         private bool running;
         private readonly LinkedList<MessageDispatch> channel = new LinkedList<MessageDispatch>();
 
         public MessageDispatchChannel()
         {
-            this.waiters = new WaitHandle[] { this.waiter, this.wakeAll };
         }
 
         #region Properties
@@ -113,7 +110,7 @@ namespace Apache.NMS.Stomp.Util
                 if(!Closed)
                 {
                     this.running = true;
-                    this.wakeAll.Reset();
+                    this.waiter.Reset();
                 }
             }
         }
@@ -123,7 +120,7 @@ namespace Apache.NMS.Stomp.Util
             lock(mutex)
             {
                 this.running = false;
-                this.wakeAll.Set();
+                this.waiter.Set();
             }
         }
 
@@ -137,7 +134,7 @@ namespace Apache.NMS.Stomp.Util
                     this.closed = true;
                 }
 
-                this.wakeAll.Set();
+                this.waiter.Set();
             }
         }
 
@@ -168,9 +165,15 @@ namespace Apache.NMS.Stomp.Util
             // Wait until the channel is ready to deliver messages.
             if( timeout != TimeSpan.Zero && !Closed && ( Empty || !Running ) )
             {
-                this.mutex.ReleaseMutex();
+                // This isn't the greatest way to do this but to work on the
+                // .NETCF its the only solution I could find so far.  This
+                // code will only really work for one Thread using the event
+                // channel to wait as all waiters are going to drop out of
+                // here regardless of the fact that only one message could
+                // be on the Queue.  
                 this.waiter.Reset();
-                ThreadUtil.WaitAny(this.waiters, (int)timeout.TotalMilliseconds, false);
+                this.mutex.ReleaseMutex();
+                this.waiter.WaitOne((int)timeout.TotalMilliseconds, false);
                 this.mutex.WaitOne();
             }
 

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/c0368061/src/test/csharp/Threads/ThreadPoolExecutorTest.cs
----------------------------------------------------------------------
diff --git a/src/test/csharp/Threads/ThreadPoolExecutorTest.cs b/src/test/csharp/Threads/ThreadPoolExecutorTest.cs
new file mode 100644
index 0000000..1da7241
--- /dev/null
+++ b/src/test/csharp/Threads/ThreadPoolExecutorTest.cs
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Threading;
+using Apache.NMS.Util;
+using Apache.NMS.Stomp.Threads;
+using NUnit.Framework;
+
+namespace Apache.NMS.Stomp.Test
+{
+    [TestFixture]
+    public class ThreadPoolExecutorTest
+    {
+        private const int JOB_COUNT = 100;
+        private ManualResetEvent complete = new ManualResetEvent(false);
+        private bool waitingTaskCompleted = false;
+        private CountDownLatch doneLatch;
+        private int count = 0;
+
+        internal class DummyClass
+        {
+            private int data;
+
+            public DummyClass(int data)
+            {
+                this.data = data;
+            }
+
+            public int Data
+            {
+                get { return data; }
+            }
+        }
+
+        public ThreadPoolExecutorTest()
+        {
+        }
+
+        private void TaskThatSignalsWhenItsComplete(object unused)
+        {
+            waitingTaskCompleted = true;
+            complete.Set();
+        }
+
+        private void TaskThatCountsDown(object unused)
+        {
+            doneLatch.countDown();
+        }
+
+        private void TaskThatSleeps(object unused)
+        {
+            Thread.Sleep(5000);
+        }
+
+        private void TaskThatIncrementsCount(object unused)
+        {
+            count++;
+        }
+
+        private void TaskThatThrowsAnException(object unused)
+        {
+            throw new Exception("Throwing an Exception just because");
+        }
+
+        private void TaskThatValidatesTheArg(object arg)
+        {
+            DummyClass state = arg as DummyClass;
+            if(state != null && state.Data == 10 )
+            {
+                waitingTaskCompleted = true;
+            }
+            complete.Set();
+        }
+
+        [SetUp]
+        public void SetUp()
+        {
+            this.complete.Reset();
+            this.waitingTaskCompleted = false;
+            this.doneLatch = new CountDownLatch(JOB_COUNT);
+            this.count = 0;
+        }
+
+        [Test]
+        public void TestConstructor()
+        {
+            ThreadPoolExecutor executor = new ThreadPoolExecutor();
+            Assert.IsNotNull(executor);
+            Assert.IsFalse(executor.IsShutdown);
+            executor.Shutdown();
+            Assert.IsTrue(executor.IsShutdown);
+        }
+
+        [Test]
+        public void TestSingleTaskExecuted()
+        {
+            ThreadPoolExecutor executor = new ThreadPoolExecutor();
+            Assert.IsNotNull(executor);
+            Assert.IsFalse(executor.IsShutdown);
+
+            executor.QueueUserWorkItem(TaskThatSignalsWhenItsComplete);
+
+            this.complete.WaitOne();
+            Assert.IsTrue(this.waitingTaskCompleted);
+
+            executor.Shutdown();
+            Assert.IsTrue(executor.IsShutdown);
+        }
+
+        [Test]
+        public void TestTaskParamIsPropagated()
+        {
+            ThreadPoolExecutor executor = new ThreadPoolExecutor();
+            Assert.IsNotNull(executor);
+            Assert.IsFalse(executor.IsShutdown);
+
+            executor.QueueUserWorkItem(TaskThatValidatesTheArg, new DummyClass(10));
+
+            this.complete.WaitOne();
+            Assert.IsTrue(this.waitingTaskCompleted);
+
+            executor.Shutdown();
+            Assert.IsTrue(executor.IsShutdown);
+        }
+
+        [Test]
+        public void TestAllTasksComplete()
+        {
+            ThreadPoolExecutor executor = new ThreadPoolExecutor();
+            Assert.IsNotNull(executor);
+            Assert.IsFalse(executor.IsShutdown);
+
+            for(int i = 0; i < JOB_COUNT; ++i)
+            {
+                executor.QueueUserWorkItem(TaskThatCountsDown);
+            }
+
+            Assert.IsTrue(this.doneLatch.await(TimeSpan.FromMilliseconds(30 * 1000)));
+
+            executor.Shutdown();
+            Assert.IsTrue(executor.IsShutdown);
+        }
+
+        [Test]
+        public void TestAllTasksCompleteAfterException()
+        {
+            ThreadPoolExecutor executor = new ThreadPoolExecutor();
+            Assert.IsNotNull(executor);
+            Assert.IsFalse(executor.IsShutdown);
+
+            executor.QueueUserWorkItem(TaskThatThrowsAnException);
+
+            for(int i = 0; i < JOB_COUNT; ++i)
+            {
+                executor.QueueUserWorkItem(TaskThatCountsDown);
+            }
+
+            Assert.IsTrue(this.doneLatch.await(TimeSpan.FromMilliseconds(30 * 1000)));
+
+            executor.Shutdown();
+            Assert.IsTrue(executor.IsShutdown);
+        }
+
+        [Test]
+        public void TestThatShutdownPurgesTasks()
+        {
+            ThreadPoolExecutor executor = new ThreadPoolExecutor();
+            Assert.IsNotNull(executor);
+            Assert.IsFalse(executor.IsShutdown);
+
+            executor.QueueUserWorkItem(TaskThatSleeps);
+
+            for(int i = 0; i < JOB_COUNT; ++i)
+            {
+                executor.QueueUserWorkItem(TaskThatIncrementsCount);
+            }
+
+            Thread.Sleep(100);
+
+            executor.Shutdown();
+            Assert.AreEqual(0, count);
+            Assert.IsTrue(executor.IsShutdown);
+        }
+
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/c0368061/vs2008-stomp-test.csproj
----------------------------------------------------------------------
diff --git a/vs2008-stomp-test.csproj b/vs2008-stomp-test.csproj
index b093a81..ffb03ae 100644
--- a/vs2008-stomp-test.csproj
+++ b/vs2008-stomp-test.csproj
@@ -101,6 +101,7 @@
     <Compile Include="src\test\csharp\StompHelperTest.cs" />
     <Compile Include="src\test\csharp\StompRedeliveryPolicyTest.cs" />
     <Compile Include="src\test\csharp\Threads\CompositeTaskRunnerTest.cs" />
+    <Compile Include="src\test\csharp\Threads\ThreadPoolExecutorTest.cs" />
     <Compile Include="src\test\csharp\Util\MessageDispatchChannelTest.cs" />
     <Compile Include="src\test\csharp\MessageListenerRedeliveryTest.cs" />
     <Compile Include="src\test\csharp\StompTopicTransactionTest.cs" />

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/c0368061/vs2008-stomp.csproj
----------------------------------------------------------------------
diff --git a/vs2008-stomp.csproj b/vs2008-stomp.csproj
index 0b332d4..6921324 100644
--- a/vs2008-stomp.csproj
+++ b/vs2008-stomp.csproj
@@ -110,6 +110,7 @@
     <Compile Include="src\main\csharp\RequestTimedOutException.cs" />
     <Compile Include="src\main\csharp\Threads\CompositeTask.cs" />
     <Compile Include="src\main\csharp\Threads\CompositeTaskRunner.cs" />
+    <Compile Include="src\main\csharp\Threads\ThreadPoolExecutor.cs" />
     <Compile Include="src\main\csharp\Transport\Tcp\TcpTransport.cs" />
     <Compile Include="src\main\csharp\Transport\Tcp\TcpTransportFactory.cs" />
     <Compile Include="src\main\csharp\Transport\FutureResponse.cs" />


[39/50] [abbrv] activemq-nms-stomp git commit: Call Stop() on the transport layer before disposing of it to ensure that the ResponseCorrelator (and other transports) are properly cleaned up. Fixes https://issues.apache.org/jira/browse/AMQNET-395

Posted by ta...@apache.org.
Call Stop() on the transport layer before disposing of it to ensure that the ResponseCorrelator (and other transports) are properly cleaned up.
Fixes https://issues.apache.org/jira/browse/AMQNET-395


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/ca08c348
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/ca08c348
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/ca08c348

Branch: refs/heads/1.5.x
Commit: ca08c348e986b870d69b1a64deb15a3de11f4627
Parents: f9535df
Author: Jim Gomes <jg...@apache.org>
Authored: Thu Aug 23 23:42:36 2012 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Thu Aug 23 23:42:36 2012 +0000

----------------------------------------------------------------------
 src/main/csharp/Connection.cs | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/ca08c348/src/main/csharp/Connection.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index 283158d..b62889e 100755
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -443,6 +443,7 @@ namespace Apache.NMS.Stomp
                     }
 
                     Tracer.Info("Disposing of the Transport.");
+					transport.Stop();
                     transport.Dispose();
                 }
                 catch(Exception ex)


[41/50] [abbrv] activemq-nms-stomp git commit: apply suggested fix for: https://issues.apache.org/jira/browse/AMQNET-411

Posted by ta...@apache.org.
apply suggested fix for: https://issues.apache.org/jira/browse/AMQNET-411


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/5a675184
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/5a675184
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/5a675184

Branch: refs/heads/1.5.x
Commit: 5a6751844a63f507ab7dd6a208f98bf243958abd
Parents: 5ba89b3
Author: Timothy A. Bish <ta...@apache.org>
Authored: Wed May 15 20:23:13 2013 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Wed May 15 20:23:13 2013 +0000

----------------------------------------------------------------------
 src/main/csharp/Protocol/StompWireFormat.cs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/5a675184/src/main/csharp/Protocol/StompWireFormat.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Protocol/StompWireFormat.cs b/src/main/csharp/Protocol/StompWireFormat.cs
index bf6e278..8412d6e 100644
--- a/src/main/csharp/Protocol/StompWireFormat.cs
+++ b/src/main/csharp/Protocol/StompWireFormat.cs
@@ -20,6 +20,7 @@ using Apache.NMS.Util;
 using System;
 using System.IO;
 using System.Text;
+using System.Globalization;
 
 namespace Apache.NMS.Stomp.Protocol
 {
@@ -196,7 +197,8 @@ namespace Apache.NMS.Stomp.Protocol
 
             if(frame.HasProperty("version"))
             {
-                remoteWireFormatInfo.Version = Single.Parse(frame.RemoveProperty("version"));
+                remoteWireFormatInfo.Version = Single.Parse(
+                    frame.RemoveProperty("version"), CultureInfo.InvariantCulture);
 
                 if(remoteWireFormatInfo.Version > 1.0f)
                 {


[19/50] [abbrv] activemq-nms-stomp git commit: Stub out WaitHandle.WaitAny() with platform wrapper implementation in ThreadUtil.WaitAny().

Posted by ta...@apache.org.
Stub out WaitHandle.WaitAny() with platform wrapper implementation in ThreadUtil.WaitAny().


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/4d2a8164
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/4d2a8164
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/4d2a8164

Branch: refs/heads/1.5.x
Commit: 4d2a8164f37e32520ceb90379259ad01a093da53
Parents: b615721
Author: Jim Gomes <jg...@apache.org>
Authored: Mon Jan 24 21:33:43 2011 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Mon Jan 24 21:33:43 2011 +0000

----------------------------------------------------------------------
 src/main/csharp/Util/MessageDispatchChannel.cs | 2 +-
 src/main/csharp/Util/ThreadUtil.cs             | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/4d2a8164/src/main/csharp/Util/MessageDispatchChannel.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Util/MessageDispatchChannel.cs b/src/main/csharp/Util/MessageDispatchChannel.cs
index d2d33dc..a1d7cfc 100644
--- a/src/main/csharp/Util/MessageDispatchChannel.cs
+++ b/src/main/csharp/Util/MessageDispatchChannel.cs
@@ -170,7 +170,7 @@ namespace Apache.NMS.Stomp.Util
             {
                 this.mutex.ReleaseMutex();
                 this.waiter.Reset();
-                WaitHandle.WaitAny(this.waiters, (int)timeout.TotalMilliseconds, false);
+                ThreadUtil.WaitAny(this.waiters, (int)timeout.TotalMilliseconds, false);
                 this.mutex.WaitOne();
             }
 

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/4d2a8164/src/main/csharp/Util/ThreadUtil.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Util/ThreadUtil.cs b/src/main/csharp/Util/ThreadUtil.cs
index c267395..c54b325 100644
--- a/src/main/csharp/Util/ThreadUtil.cs
+++ b/src/main/csharp/Util/ThreadUtil.cs
@@ -33,5 +33,14 @@ namespace Apache.NMS.Stomp.Util
             shutdownEvent.WaitOne(timeout, false);
 #endif
        }
+
+       public static void WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext)
+       {
+#if NETCF
+           // TODO: Implement .NET CF version of WaitAny().
+#else
+           WaitHandle.WaitAny(waitHandles, millisecondsTimeout, exitContext);
+#endif
+       }
     }
 }


[27/50] [abbrv] activemq-nms-stomp git commit: Add missing framework exists check.

Posted by ta...@apache.org.
Add missing framework exists check.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/b7a52e8e
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/b7a52e8e
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/b7a52e8e

Branch: refs/heads/1.5.x
Commit: b7a52e8eef2b187a25580ab0057593ea895ba051
Parents: 179185b
Author: Timothy A. Bish <ta...@apache.org>
Authored: Mon Oct 31 18:27:16 2011 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Mon Oct 31 18:27:16 2011 +0000

----------------------------------------------------------------------
 nant-common.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/b7a52e8e/nant-common.xml
----------------------------------------------------------------------
diff --git a/nant-common.xml b/nant-common.xml
index 5fcad45..d79bc7b 100644
--- a/nant-common.xml
+++ b/nant-common.xml
@@ -230,7 +230,9 @@
         <property name="current.build.framework.sign" value="true" />
         <property name="link.sdkdoc.version" value="SDK_v7_0" />
         <property name="link.sdkdoc.web" value="true" />
-        <property name="nant.settings.currentframework" value="${current.build.framework}" />
+        <if test="${framework::exists(current.build.framework)}">
+            <property name="nant.settings.currentframework" value="${current.build.framework}" />
+        </if>
     </target>
 
     <target name="set-netcf-2.0-framework-configuration">


[04/50] [abbrv] activemq-nms-stomp git commit: https://issues.apache.org/activemq/browse/AMQNET-245

Posted by ta...@apache.org.
https://issues.apache.org/activemq/browse/AMQNET-245

Added encode of timestamp field.  Removed default init of timestamp in Message class.


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/ddd11a49
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/ddd11a49
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/ddd11a49

Branch: refs/heads/1.2.x
Commit: ddd11a496cf71197bd1e481d2b459d426cdb8da3
Parents: 47dc8fb
Author: Timothy A. Bish <ta...@apache.org>
Authored: Tue Mar 30 13:38:57 2010 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Tue Mar 30 13:38:57 2010 +0000

----------------------------------------------------------------------
 src/main/csharp/Commands/Message.cs         | 1 -
 src/main/csharp/Protocol/StompWireFormat.cs | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/ddd11a49/src/main/csharp/Commands/Message.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Commands/Message.cs b/src/main/csharp/Commands/Message.cs
index dd2aebf..d7e8679 100644
--- a/src/main/csharp/Commands/Message.cs
+++ b/src/main/csharp/Commands/Message.cs
@@ -39,7 +39,6 @@ namespace Apache.NMS.Stomp.Commands
 
         public Message() : base()
         {
-            Timestamp = DateUtils.ToJavaTimeUtc(DateTime.UtcNow);
         }
 
         public override byte GetDataStructureType()

http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/ddd11a49/src/main/csharp/Protocol/StompWireFormat.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Protocol/StompWireFormat.cs b/src/main/csharp/Protocol/StompWireFormat.cs
index eaf0caa..44f3d9b 100644
--- a/src/main/csharp/Protocol/StompWireFormat.cs
+++ b/src/main/csharp/Protocol/StompWireFormat.cs
@@ -306,6 +306,10 @@ namespace Apache.NMS.Stomp.Protocol
             {
                 frame.SetProperty("expires", command.Expiration);
             }
+            if(command.Timestamp != 0)
+            {
+                frame.SetProperty("timestamp", command.Timestamp);
+            }
             if(command.Priority != 4)
             {                
                 frame.SetProperty("priority", command.Priority);


[44/50] [abbrv] activemq-nms-stomp git commit: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486)

Posted by ta...@apache.org.
Clean the individual configurations.
Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486)



Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/3c7acaca
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/3c7acaca
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/3c7acaca

Branch: refs/heads/1.6.x
Commit: 3c7acacab8af0fbb26a16e74d5d6be7c37b1d872
Parents: f895eff
Author: Jim Gomes <jg...@apache.org>
Authored: Wed Aug 6 01:05:35 2014 +0000
Committer: Jim Gomes <jg...@apache.org>
Committed: Wed Aug 6 01:05:35 2014 +0000

----------------------------------------------------------------------
 nant-common.xml | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/3c7acaca/nant-common.xml
----------------------------------------------------------------------
diff --git a/nant-common.xml b/nant-common.xml
index be40af6..55694f9 100644
--- a/nant-common.xml
+++ b/nant-common.xml
@@ -506,9 +506,18 @@
         <if test="${target::exists('clean-init')}">
             <call target="clean-init" />
         </if>
-        <delete dir="build" if="${directory::exists('build')}" />
-        <delete dir="obj" if="${directory::exists('obj')}" />
-        <delete dir="package" if="${directory::exists('package')}" />
+        <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
+            <foreach item="String" in="${build.config.strings}" delim="," property="current.build.config">
+                <call target="clean-proj" />
+            </foreach>
+        </foreach>
+    </target>
+
+    <target name="clean-proj" depends="init" description="Deletes specific project build">
+        <property name="clean.dir" value="build/${current.build.framework}/${current.build.config}" />
+        <delete dir="${clean.dir}" if="${directory::exists(clean.dir)}" />
+        <property name="clean.dir" value="package/${current.build.config}" />
+        <delete dir="${clean.dir}" if="${directory::exists(clean.dir)}" />
     </target>
 
     <target name="package" description="Bundle the source and binary distributions.">