Author: jgomes
Date: Tue Sep 30 14:29:43 2008
New Revision: 700586

URL: http://svn.apache.org/viewvc?rev=700586&view=rev
Log:
Set requestTimeout.

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

Modified: 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs?rev=700586&r1=700585&r2=700586&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs 
(original)
+++ 
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs 
Tue Sep 30 14:29:43 2008
@@ -407,7 +407,7 @@
 
                // Properties
 
-               private TimeSpan requestTimeout;
+               private TimeSpan requestTimeout = 
Apache.NMS.NMSConstants.defaultRequestTimeout;
                public TimeSpan RequestTimeout
                {
                        get { return this.requestTimeout; }

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=700586&r1=700585&r2=700586&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 Sep 30 14:29:43 2008
@@ -18,18 +18,18 @@
 
 namespace Apache.NMS.EMS
 {
-    /// <summary>
+       /// <summary>
        /// Represents a NMS session to TIBCO.
-    /// </summary>
-    public class Session : Apache.NMS.ISession
-    {
-       public readonly TIBCO.EMS.Session tibcoSession;
-       private bool closed = false;
-       private bool disposed = false;
-
-        public Session(TIBCO.EMS.Session session)
-        {
-               this.tibcoSession = session;
+       /// </summary>
+       public class Session : Apache.NMS.ISession
+       {
+               public readonly TIBCO.EMS.Session tibcoSession;
+               private bool closed = false;
+               private bool disposed = false;
+
+               public Session(TIBCO.EMS.Session session)
+               {
+                       this.tibcoSession = session;
                }
 
                ~Session()
@@ -40,44 +40,44 @@
                #region ISession Members
 
                public Apache.NMS.IMessageProducer CreateProducer()
-        {
-            return CreateProducer(null);
-        }
+               {
+                       return CreateProducer(null);
+               }
 
                public Apache.NMS.IMessageProducer 
CreateProducer(Apache.NMS.IDestination destination)
-        {
+               {
                        Apache.NMS.EMS.Destination destinationObj = 
(Apache.NMS.EMS.Destination) destination;
 
                        return EMSConvert.ToNMSMessageProducer(this, 
this.tibcoSession.CreateProducer(destinationObj.tibcoDestination));
-        }
+               }
 
                public Apache.NMS.IMessageConsumer 
CreateConsumer(Apache.NMS.IDestination destination)
-        {
+               {
                        Apache.NMS.EMS.Destination destinationObj = 
(Apache.NMS.EMS.Destination) destination;
 
                        return EMSConvert.ToNMSMessageConsumer(this, 
this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination));
-        }
+               }
 
                public Apache.NMS.IMessageConsumer 
CreateConsumer(Apache.NMS.IDestination destination, string selector)
-        {
+               {
                        Apache.NMS.EMS.Destination destinationObj = 
(Apache.NMS.EMS.Destination) destination;
 
                        return EMSConvert.ToNMSMessageConsumer(this, 
this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination, selector));
                }
 
                public Apache.NMS.IMessageConsumer 
CreateConsumer(Apache.NMS.IDestination destination, string selector, bool 
noLocal)
-        {
+               {
                        Apache.NMS.EMS.Destination destinationObj = 
(Apache.NMS.EMS.Destination) destination;
 
                        return EMSConvert.ToNMSMessageConsumer(this, 
this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination, 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;
 
                        return EMSConvert.ToNMSMessageConsumer(this, 
this.tibcoSession.CreateDurableSubscriber(topicObj.tibcoTopic, name, selector, 
noLocal));
-        }
+               }
 
                public void DeleteDurableConsumer(string name)
                {
@@ -85,52 +85,52 @@
                }
 
                public Apache.NMS.IQueue GetQueue(string name)
-        {
+               {
                        return 
EMSConvert.ToNMSQueue(this.tibcoSession.CreateQueue(name));
-        }
+               }
 
                public Apache.NMS.ITopic GetTopic(string name)
-        {
+               {
                        return 
EMSConvert.ToNMSTopic(this.tibcoSession.CreateTopic(name));
-        }
+               }
 
                public Apache.NMS.ITemporaryQueue CreateTemporaryQueue()
-        {
+               {
                        return 
EMSConvert.ToNMSTemporaryQueue(this.tibcoSession.CreateTemporaryQueue());
-        }
+               }
 
                public Apache.NMS.ITemporaryTopic CreateTemporaryTopic()
-        {
+               {
                        return 
EMSConvert.ToNMSTemporaryTopic(this.tibcoSession.CreateTemporaryTopic());
-        }
+               }
 
                public Apache.NMS.IMessage CreateMessage()
-        {
+               {
                        return 
EMSConvert.ToNMSMessage(this.tibcoSession.CreateMessage());
-        }
+               }
 
                public Apache.NMS.ITextMessage CreateTextMessage()
-        {
+               {
                        return 
EMSConvert.ToNMSTextMessage(this.tibcoSession.CreateTextMessage());
-        }
+               }
 
                public Apache.NMS.ITextMessage CreateTextMessage(string text)
-        {
+               {
                        return 
EMSConvert.ToNMSTextMessage(this.tibcoSession.CreateTextMessage(text));
-        }
+               }
 
                public Apache.NMS.IMapMessage CreateMapMessage()
-        {
+               {
                        return 
EMSConvert.ToNMSMapMessage(this.tibcoSession.CreateMapMessage());
-        }
+               }
 
                public Apache.NMS.IBytesMessage CreateBytesMessage()
-        {
+               {
                        return 
EMSConvert.ToNMSBytesMessage(this.tibcoSession.CreateBytesMessage());
-        }
+               }
 
                public Apache.NMS.IBytesMessage CreateBytesMessage(byte[] body)
-        {
+               {
                        Apache.NMS.IBytesMessage bytesMessage = 
CreateBytesMessage();
 
                        if(null != bytesMessage)
@@ -139,46 +139,47 @@
                        }
 
                        return bytesMessage;
-        }
+               }
 
                public Apache.NMS.IObjectMessage CreateObjectMessage(Object 
body)
                {
                        return 
EMSConvert.ToNMSObjectMessage(this.tibcoSession.CreateObjectMessage(body));
                }
                
-        public void Commit()
-        {
+               public void Commit()
+               {
                        this.tibcoSession.Commit();
-        }
-        
-        public void Rollback()
-        {
+               }
+               
+               public void Rollback()
+               {
                        this.tibcoSession.Rollback();
-        }
-        
-        // Properties
+               }
+               
+               // Properties
 
                /// <summary>
                /// The default timeout for network requests.
                /// </summary>
+               private TimeSpan requestTimeout = 
Apache.NMS.NMSConstants.defaultRequestTimeout;
                public TimeSpan RequestTimeout
                {
-                       get { return 
Apache.NMS.NMSConstants.defaultRequestTimeout; }
-                       set { }
+                       get { return this.requestTimeout; }
+                       set { this.requestTimeout = value; }
                }
                
                public bool Transacted
-        {
-            get { return this.tibcoSession.Transacted; }
-        }
+               {
+                       get { return this.tibcoSession.Transacted; }
+               }
 
                public Apache.NMS.AcknowledgementMode AcknowledgementMode
-        {
-            get { return 
EMSConvert.ToAcknowledgementMode(this.tibcoSession.SessionAcknowledgeMode); }
-        }
+               {
+                       get { return 
EMSConvert.ToAcknowledgementMode(this.tibcoSession.SessionAcknowledgeMode); }
+               }
 
-        public void Close()
-        {
+               public void Close()
+               {
                        lock(this)
                        {
                                if(closed)
@@ -189,7 +190,7 @@
                                this.tibcoSession.Close();
                                closed = true;
                        }
-        }
+               }
 
                #endregion
 


Reply via email to