activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r898074 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp: MessageConsumer.cs Session.cs
Date Mon, 11 Jan 2010 21:38:27 GMT
Author: tabish
Date: Mon Jan 11 21:38:27 2010
New Revision: 898074

URL: http://svn.apache.org/viewvc?rev=898074&view=rev
Log:
port code to build on .NET CF 2.0 and above

Modified:
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs?rev=898074&r1=898073&r2=898074&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs Mon
Jan 11 21:38:27 2010
@@ -428,7 +428,7 @@
                 if(++dispatchedCount % 1000 == 0)
                 {
                     dispatchedCount = 0;
-                    Thread.Sleep(1);
+                    Thread.Sleep((int)1);
                 }
             }
             catch(Exception e)
@@ -577,7 +577,7 @@
                     this.dispatchedMessages.Remove(dispatch);
                 }
 
-				// TODO - Not sure if we need to ack this in stomp.
+                // TODO - Not sure if we need to ack this in stomp.
                 // AckLater(dispatch, AckType.ConsumedAck);
             }
             else
@@ -592,23 +592,23 @@
                     {
                         lock(this.dispatchedMessages)
                         {
-			                MessageAck ack = new MessageAck();
-			
-			                ack.AckType = (byte) AckType.ConsumedAck;
-			                ack.ConsumerId = this.info.ConsumerId;
-			                ack.Destination = dispatch.Destination;
-			                ack.LastMessageId = dispatch.Message.MessageId;
-			                ack.MessageCount = 1;
+                            MessageAck ack = new MessageAck();
+
+                            ack.AckType = (byte) AckType.ConsumedAck;
+                            ack.ConsumerId = this.info.ConsumerId;
+                            ack.Destination = dispatch.Destination;
+                            ack.LastMessageId = dispatch.Message.MessageId;
+                            ack.MessageCount = 1;
 
                             this.session.SendAck(ack);
                         }
-						
+
                         this.deliveringAcks.Value = false;
                     }
                 }
                 else if(this.session.IsClientAcknowledge || this.session.IsIndividualAcknowledge)
                 {
-					// Do nothing.
+                    // Do nothing.
                 }
                 else
                 {
@@ -799,7 +799,7 @@
 
                 if(waitTime.CompareTo(TimeSpan.Zero) > 0)
                 {
-                    Thread.Sleep(waitTime);
+                    Thread.Sleep((int)waitTime.TotalMilliseconds);
                 }
 
                 this.Start();

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs?rev=898074&r1=898073&r2=898074&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs Mon Jan 11
21:38:27 2010
@@ -49,7 +49,7 @@
         private readonly SessionInfo info;
         private int consumerCounter;
         private int producerCounter;
-        private long nextDeliveryId;
+        private int nextDeliveryId;
         private bool disposed = false;
         private bool closed = false;
         private bool closing = false;
@@ -804,7 +804,7 @@
                 this.connection.SyncRequest(ack);
             }
         }
-        
+
         /// <summary>
         /// Prevents message from throwing an exception if a client calls Acknoweldge on
         /// a message that is part of a transaction either being produced or consumed.  The



Mime
View raw message