activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r687183 - in /activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp: Connection.cs MessageProducer.cs Session.cs
Date Tue, 19 Aug 2008 22:16:09 GMT
Author: jgomes
Date: Tue Aug 19 15:16:05 2008
New Revision: 687183

URL: http://svn.apache.org/viewvc?rev=687183&view=rev
Log:
Changed IConnection, ISession to have RequestTimeout property similar to IMessageProducer.
Fixes [AMQNET-89]. (See https://issues.apache.org/activemq/browse/AMQNET-89)

Modified:
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Connection.cs
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/MessageProducer.cs
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Connection.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Connection.cs?rev=687183&r1=687182&r2=687183&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Connection.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Connection.cs Tue Aug 19
15:16:05 2008
@@ -97,12 +97,6 @@
 			                                                  EMSConvert.ToSessionMode(mode)));
 		}
 
-		public Apache.NMS.ISession CreateSession(Apache.NMS.AcknowledgementMode mode, TimeSpan
requestTimeout)
-		{
-			// Ignore: requestTimeout
-			return CreateSession(mode);
-		}
-
 		public void Close()
 		{
 			lock(this)
@@ -153,6 +147,19 @@
 			disposed = true;
 		}
 
+		#endregion
+
+		#region Attributes
+
+		/// <summary>
+		/// The default timeout for network requests.
+		/// </summary>
+		public TimeSpan RequestTimeout
+		{
+			get { return Apache.NMS.NMSConstants.defaultRequestTimeout; }
+			set { }
+		}
+
 		public Apache.NMS.AcknowledgementMode AcknowledgementMode
         {
             get { return acknowledgementMode; }
@@ -165,10 +172,10 @@
             set { this.tibcoConnection.ClientID = value; }
         }
 
-		public event Apache.NMS.ExceptionListener ExceptionListener;
-
 		#endregion
 
+		public event Apache.NMS.ExceptionListener ExceptionListener;
+
 		private void HandleTibcoException(object sender, TIBCO.EMS.EMSExceptionEventArgs arg)
 		{
 			if(ExceptionListener != null)

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/MessageProducer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/MessageProducer.cs?rev=687183&r1=687182&r2=687183&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/MessageProducer.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/MessageProducer.cs Tue Aug
19 15:16:05 2008
@@ -125,10 +125,13 @@
 			set { this.tibcoMessageProducer.TimeToLive = (long) value.TotalMilliseconds; }
 		}
 
+		/// <summary>
+		/// The default timeout for network requests.
+		/// </summary>
 		public TimeSpan RequestTimeout
 		{
-			get { return TimeSpan.FromMilliseconds(Timeout.Infinite); }
-			set {  }
+			get { return Apache.NMS.NMSConstants.defaultRequestTimeout; }
+			set { }
 		}
 
 		public byte Priority

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs?rev=687183&r1=687182&r2=687183&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs Tue Aug 19 15:16:05
2008
@@ -51,12 +51,6 @@
 			return EMSConvert.ToNMSMessageProducer(this, this.tibcoSession.CreateProducer(destinationObj.tibcoDestination));
         }
 
-		public Apache.NMS.IMessageProducer CreateProducer(Apache.NMS.IDestination destination,
TimeSpan requestTimeout)
-		{
-			// Ignore: requestTimeout
-			return CreateProducer(destination);
-		}
-
 		public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination)
         {
 			Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination) destination;
@@ -64,12 +58,6 @@
 			return EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination));
         }
 
-		public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination,
TimeSpan requestTimeout)
-		{
-			// Ignore: requestTimeout
-			return CreateConsumer(destination);
-		}
-
 		public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination,
string selector)
         {
 			Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination) destination;
@@ -77,12 +65,6 @@
 			return EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination,
selector));
 		}
 
-		public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination,
string selector, TimeSpan requestTimeout)
-		{
-			// Ignore: requestTimeout
-			return CreateConsumer(destination, selector);
-		}
-
 		public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination,
string selector, bool noLocal)
         {
 			Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination) destination;
@@ -90,12 +72,6 @@
 			return EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination,
selector, noLocal));
         }
 
-		public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination,
string selector, bool noLocal, TimeSpan requestTimeout)
-		{
-			// Ignore: requestTimeout
-			return CreateConsumer(destination, selector, noLocal);
-		}
-
 		public Apache.NMS.IMessageConsumer CreateDurableConsumer(Apache.NMS.ITopic destination,
string name, string selector, bool noLocal)
         {
 			Apache.NMS.EMS.Topic topicObj = (Apache.NMS.EMS.Topic) destination;
@@ -103,23 +79,11 @@
 			return EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateDurableSubscriber(topicObj.tibcoTopic,
name, selector, noLocal));
         }
 
-		public Apache.NMS.IMessageConsumer CreateDurableConsumer(Apache.NMS.ITopic destination,
string name, string selector, bool noLocal, TimeSpan requestTimeout)
-		{
-			// Ignore: requestTimeout
-			return CreateDurableConsumer(destination, name, selector, noLocal);
-		}
-
 		public void DeleteDurableConsumer(string name)
 		{
 			this.tibcoSession.Unsubscribe(name);
 		}
 
-		public void DeleteDurableConsumer(string name, TimeSpan requestTimeout)
-		{
-			// Ignore: requestTimeout
-			DeleteDurableConsumer(name);
-		}
-
 		public Apache.NMS.IQueue GetQueue(string name)
         {
 			return EMSConvert.ToNMSQueue(this.tibcoSession.CreateQueue(name));
@@ -193,8 +157,17 @@
         }
         
         // Properties
-        
-        public bool Transacted
+
+		/// <summary>
+		/// The default timeout for network requests.
+		/// </summary>
+		public TimeSpan RequestTimeout
+		{
+			get { return Apache.NMS.NMSConstants.defaultRequestTimeout; }
+			set { }
+		}
+		
+		public bool Transacted
         {
             get { return this.tibcoSession.Transacted; }
         }



Mime
View raw message