activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r908227 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk: ./ src/main/csharp/ src/main/csharp/Commands/
Date Tue, 09 Feb 2010 21:17:21 GMT
Author: jgomes
Date: Tue Feb  9 21:17:20 2010
New Revision: 908227

URL: http://svn.apache.org/viewvc?rev=908227&view=rev
Log:
Added serialization support to all NMS exceptions.
Fixes [AMQNET-210]. (See https://issues.apache.org/activemq/browse/AMQNET-210)

Modified:
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/   (props changed)
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/BrokerException.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BrokerError.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionClosedException.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.sln

Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Feb  9 21:17:20 2010
@@ -1,11 +1,10 @@
-.settings
+*.suo
 .project
+.settings
 build
-obj
-*.suo
 lib
+obj
 package
-bin
+vs2008-stomp-test.pidb
 vs2008-stomp.pidb
 vs2008-stomp.userprefs
-vs2008-stomp-test.pidb

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/BrokerException.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/BrokerException.cs?rev=908227&r1=908226&r2=908227&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/BrokerException.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/BrokerException.cs Tue Feb  9 21:17:20 2010
@@ -14,61 +14,95 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+using System;
 using System.Text;
-using Apache.NMS;
 using Apache.NMS.Stomp.Commands;
 
 namespace Apache.NMS.Stomp
 {
-
-    /// <summary>
-    /// Exception thrown when the broker returns an error
-    /// </summary>
-    public class BrokerException : NMSException
-    {
-        private BrokerError brokerError;
-
-        /// <summary>
-        /// Generates a nice textual stack trace
-        /// </summary>
-        public static string StackTraceDump(StackTraceElement[] elements)
-        {
-            StringBuilder builder = new StringBuilder();
-            if (elements != null)
-            {
-                foreach (StackTraceElement e in elements)
-                {
-                    builder.Append("\n " + e.ClassName + "." + e.MethodName + "(" + e.FileName + ":" + e.LineNumber + ")");
-                }
-            }
-            return builder.ToString();
-        }
-
-        public BrokerException() : base("Broker failed with missing exception log")
-        {
-        }
-
-        public BrokerException(BrokerError brokerError) : base(
-            brokerError.ExceptionClass + " : " + brokerError.Message + "\n" + StackTraceDump(brokerError.StackTraceElements))
-        {
-            this.brokerError = brokerError;
-        }
-
-        public BrokerError BrokerError
-        {
-            get {
-                return brokerError;
-            }
-        }
-
-        public virtual string JavaStackTrace
-        {
-            get {
-                return brokerError.StackTrace;
-            }
-        }
-
-    }
+	/// <summary>
+	/// Exception thrown when the broker returns an error
+	/// </summary>
+	[Serializable]
+	public class BrokerException : NMSException
+	{
+		private BrokerError brokerError = null;
+
+		public BrokerException()
+			: base("Broker failed with missing exception log")
+		{
+		}
+
+		public BrokerException(BrokerError brokerError)
+			: this(brokerError, null)
+		{
+		}
+
+		public BrokerException(BrokerError brokerError, Exception innerException)
+			: base(brokerError.ExceptionClass + " : " + brokerError.Message + "\n" + StackTraceDump(brokerError.StackTraceElements),
+					innerException)
+		{
+			this.brokerError = brokerError;
+		}
+
+		#region ISerializable interface implementation
+#if !NETCF
+
+		/// <summary>
+		/// Initializes a new instance of the BrokerException class with serialized data.
+		/// Throws System.ArgumentNullException if the info parameter is null.
+		/// Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
+		/// </summary>
+		/// <param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
+		/// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
+		protected BrokerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
+			: base(info, context)
+		{
+			brokerError = info.GetValue("BrokerException.brokerError", typeof(BrokerError)) as BrokerError;
+		}
+
+		/// <summary>
+		/// When overridden in a derived class, sets the SerializationInfo
+		/// with information about the exception.
+		/// </summary>
+		/// <param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
+		/// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
+		public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
+		{
+			base.GetObjectData(info, context);
+			info.AddValue("BrokerException.brokerError", brokerError);
+		}
+
+#endif
+		#endregion
+
+		/// <summary>
+		/// Generates a nice textual stack trace
+		/// </summary>
+		public static string StackTraceDump(StackTraceElement[] elements)
+		{
+			StringBuilder builder = new StringBuilder();
+			if(elements != null)
+			{
+				foreach(StackTraceElement e in elements)
+				{
+					builder.Append("\n " + e.ClassName + "." + e.MethodName + "(" + e.FileName + ":" + e.LineNumber + ")");
+				}
+			}
+			return builder.ToString();
+		}
+
+		public BrokerError BrokerError
+		{
+			get { return brokerError; }
+		}
+
+		public virtual string JavaStackTrace
+		{
+			get { return brokerError.StackTrace; }
+		}
+	}
 }
 
 

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BrokerError.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BrokerError.cs?rev=908227&r1=908226&r2=908227&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BrokerError.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BrokerError.cs Tue Feb  9 21:17:20 2010
@@ -20,76 +20,79 @@
 
 namespace Apache.NMS.Stomp.Commands
 {
-    public struct StackTraceElement
-    {
-        public string ClassName;
-        public string FileName;
-        public string MethodName;
-        public int LineNumber;
-    }
-
-    /// <summary>
-    /// Represents an exception on the broker
-    /// </summary>
-    public class BrokerError : BaseCommand
-    {
-        private string message;
-        private string exceptionClass;
-        private StackTraceElement[] stackTraceElements = {};
-        private BrokerError cause;
-
-        public override byte GetDataStructureType()
-        {
-            return DataStructureTypes.ErrorType;
-        }
-        
-        public string Message
-        {
-            get { return message; }
-            set { message = value; }
-        }
-
-        public string ExceptionClass
-        {
-            get { return exceptionClass; }
-            set { exceptionClass = value; }
-        }
-
-        public StackTraceElement[] StackTraceElements
-        {
-            get { return stackTraceElements; }
-            set { stackTraceElements = value; }
-        }
-
-        public BrokerError Cause
-        {
-            get { return cause; }
-            set { cause = value; }
-        }
-
-        public String StackTrace
-        {
-            get {
-                StringWriter writer = new StringWriter();
-                PrintStackTrace(writer);
-                return writer.ToString();
-            }
-        }
-
-        public void PrintStackTrace(TextWriter writer)
-        {
-            writer.WriteLine(exceptionClass + ": " + message);
-            for (int i = 0; i < stackTraceElements.Length; i++)
-            {
-                StackTraceElement element = stackTraceElements[i];
-                writer.WriteLine("    at " + element.ClassName + "." + element.MethodName + "(" + element.FileName + ":" + element.LineNumber + ")");
-            }
-            if (cause != null)
-            {
-                writer.WriteLine("Nested Exception:");
-                cause.PrintStackTrace(writer);
-            }
-        }
-    }
+	public struct StackTraceElement
+	{
+		public string ClassName;
+		public string FileName;
+		public string MethodName;
+		public int LineNumber;
+	}
+
+	/// <summary>
+	/// Represents an exception on the broker
+	/// </summary>
+	[Serializable]
+	public class BrokerError : BaseCommand
+	{
+		private string message;
+		private string exceptionClass;
+		private StackTraceElement[] stackTraceElements = { };
+		private BrokerError cause;
+
+		public override byte GetDataStructureType()
+		{
+			return DataStructureTypes.ErrorType;
+		}
+
+		public string Message
+		{
+			get { return message; }
+			set { message = value; }
+		}
+
+		public string ExceptionClass
+		{
+			get { return exceptionClass; }
+			set { exceptionClass = value; }
+		}
+
+		public StackTraceElement[] StackTraceElements
+		{
+			get { return stackTraceElements; }
+			set { stackTraceElements = value; }
+		}
+
+		public BrokerError Cause
+		{
+			get { return cause; }
+			set { cause = value; }
+		}
+
+		public String StackTrace
+		{
+			get
+			{
+				StringWriter writer = new StringWriter();
+				PrintStackTrace(writer);
+				return writer.ToString();
+			}
+		}
+
+		public void PrintStackTrace(TextWriter writer)
+		{
+			writer.WriteLine(exceptionClass + ": " + message);
+			for(int i = 0; i < stackTraceElements.Length; i++)
+			{
+				StackTraceElement element = stackTraceElements[i];
+				writer.WriteLine("    at " + element.ClassName + "." + element.MethodName + "(" + element.FileName + ":" + element.LineNumber + ")");
+			}
+
+			if(cause != null)
+			{
+				writer.WriteLine("Nested Exception:");
+				cause.PrintStackTrace(writer);
+			}
+		}
+	}
 }
 

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs?rev=908227&r1=908226&r2=908227&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs Tue Feb  9 21:17:20 2010
@@ -21,667 +21,666 @@
 using Apache.NMS.Stomp.Commands;
 using Apache.NMS.Stomp.Transport;
 using Apache.NMS.Stomp.Util;
-using Apache.NMS;
 using Apache.NMS.Util;
 
 namespace Apache.NMS.Stomp
 {
-    /// <summary>
-    /// Represents a connection with a message broker
-    /// </summary>
-    public class Connection : IConnection
-    {
-        private static readonly IdGenerator CONNECTION_ID_GENERATOR = new IdGenerator();
-
-        private readonly Uri brokerUri;
-        private ITransport transport;
-        private readonly ConnectionInfo info;
-
-        private AcknowledgementMode acknowledgementMode = AcknowledgementMode.AutoAcknowledge;
-        private bool asyncSend = false;
-        private bool alwaysSyncSend = false;
-        private bool copyMessageOnSend = true;
-        private bool sendAcksAsync = false;
-        private bool dispatchAsync = true;
-        private string transformation = null;
-        private IRedeliveryPolicy redeliveryPolicy;
-        private PrefetchPolicy prefetchPolicy = new PrefetchPolicy();
-
-        private bool userSpecifiedClientID;
-        private TimeSpan requestTimeout;
-        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 int sessionCounter = 0;
-        private int temporaryDestinationCounter = 0;
-        private int localTransactionCounter;
-        private readonly Atomic<bool> started = new Atomic<bool>(false);
-        private ConnectionMetaData metaData = null;
-        private bool disposed = false;
-        private IdGenerator clientIdGenerator;
-
-        public Connection(Uri connectionUri, ITransport transport, IdGenerator clientIdGenerator)
-        {
-            this.brokerUri = connectionUri;
-            this.requestTimeout = transport.RequestTimeout;
-            this.clientIdGenerator = clientIdGenerator;
-
-            this.transport = transport;
-            this.transport.Command = new CommandHandler(OnCommand);
-            this.transport.Exception = new ExceptionHandler(OnException);
-            this.transport.Interrupted = new InterruptedHandler(OnTransportInterrupted);
-            this.transport.Resumed = new ResumedHandler(OnTransportResumed);
-
-            ConnectionId id = new ConnectionId();
-            id.Value = CONNECTION_ID_GENERATOR.GenerateId();
-
-            this.info = new ConnectionInfo();
-            this.info.ConnectionId = id;
-        }
-
-        ~Connection()
-        {
-            Dispose(false);
-        }
-
-        /// <summary>
-        /// A delegate that can receive transport level exceptions.
-        /// </summary>
-        public event ExceptionListener ExceptionListener;
-
-        /// <summary>
-        /// An asynchronous listener that is notified when a Fault tolerant connection
-        /// has been interrupted.
-        /// </summary>
-        public event ConnectionInterruptedListener ConnectionInterruptedListener;
-
-        /// <summary>
-        /// An asynchronous listener that is notified when a Fault tolerant connection
-        /// has been resumed.
-        /// </summary>
-        public event ConnectionResumedListener ConnectionResumedListener;
-
-        #region Properties
-
-        public String UserName
-        {
-            get { return this.info.UserName; }
-            set { this.info.UserName = value; }
-        }
-
-        public String Password
-        {
-            get { return this.info.Password; }
-            set { this.info.Password = value; }
-        }
-
-        /// <summary>
-        /// This property indicates whether or not async send is enabled.
-        /// </summary>
-        public bool AsyncSend
-        {
-            get { return asyncSend; }
-            set { asyncSend = value; }
-        }
-
-        /// <summary>
-        /// This property sets the acknowledgment mode for the connection.
-        /// The URI parameter connection.ackmode can be set to a string value
-        /// that maps to the enumeration value.
-        /// </summary>
-        public string AckMode
-        {
-            set { this.acknowledgementMode = NMSConvert.ToAcknowledgementMode(value); }
-        }
-
-        /// <summary>
-        /// This property forces all messages that are sent to be sent synchronously overriding
-        /// any usage of the AsyncSend flag. This can reduce performance in some cases since the
-        /// only messages we normally send synchronously are Persistent messages not sent in a
-        /// transaction. This options guarantees that no send will return until the broker has
-        /// acknowledge receipt of the message
-        /// </summary>
-        public bool AlwaysSyncSend
-        {
-            get { return alwaysSyncSend; }
-            set { alwaysSyncSend = value; }
-        }
-
-        /// <summary>
-        /// This property indicates whether Message's should be copied before being sent via
-        /// one of the Connection's send methods.  Copying the Message object allows the user
-        /// to resuse the Object over for another send.  If the message isn't copied performance
-        /// can improve but the user must not reuse the Object as it may not have been sent
-        /// before they reset its payload.
-        /// </summary>
-        public bool CopyMessageOnSend
-        {
-            get { return copyMessageOnSend; }
-            set { copyMessageOnSend = value; }
-        }
-
-        /// <summary>
-        /// This property indicates whether or not async sends are used for
-        /// message acknowledgement messages.  Sending Acks async can improve
-        /// performance but may decrease reliability.
-        /// </summary>
-        public bool SendAcksAsync
-        {
-            get { return sendAcksAsync; }
-            set { sendAcksAsync = value; }
-        }
-
-        /// <summary>
-        /// synchronously or asynchronously by the broker.  Set to false for a slow
-        /// consumer and true for a fast consumer.
-        /// </summary>
-        public bool DispatchAsync
-        {
-            get { return this.dispatchAsync; }
-            set { this.dispatchAsync = value; }
-        }
-
-        /// <summary>
-        /// Sets the default Transformation attribute applied to Consumers.  If a consumer
-        /// is to receive Map messages from the Broker then the user should set the "jms-map-xml"
-        /// transformation on the consumer so that all MapMessages are sent as XML.
-        /// </summary>
-        public string Transformation
-        {
-            get { return this.transformation; }
-            set { this.transformation = value; }
-        }
-
-        public IConnectionMetaData MetaData
-        {
-            get { return this.metaData ?? (this.metaData = new ConnectionMetaData()); }
-        }
-
-        public Uri BrokerUri
-        {
-            get { return brokerUri; }
-        }
-
-        public ITransport ITransport
-        {
-            get { return transport; }
-            set { this.transport = value; }
-        }
-
-        public TimeSpan RequestTimeout
-        {
-            get { return this.requestTimeout; }
-            set { this.requestTimeout = value; }
-        }
-
-        public AcknowledgementMode AcknowledgementMode
-        {
-            get { return acknowledgementMode; }
-            set { this.acknowledgementMode = value; }
-        }
-
-        public string ClientId
-        {
-            get { return info.ClientId; }
-            set
-            {
-                if(this.connected)
-                {
-                    throw new NMSException("You cannot change the ClientId once the Connection is connected");
-                }
-
-                this.info.ClientId = value;
-                this.userSpecifiedClientID = true;
-                CheckConnected();
-            }
-        }
-
-        /// <summary>
-        /// The Default Client Id used if the ClientId property is not set explicity.
-        /// </summary>
-        public string DefaultClientId
-        {
-            set
-            {
-                this.info.ClientId = value;
-                this.userSpecifiedClientID = true;
-            }
-        }
-
-        public ConnectionId ConnectionId
-        {
-            get { return info.ConnectionId; }
-        }
-
-        /// <summary>
-        /// Get/or set the redelivery policy for this connection.
-        /// </summary>
-        public IRedeliveryPolicy RedeliveryPolicy
-        {
-            get { return this.redeliveryPolicy; }
-            set { this.redeliveryPolicy = value; }
-        }
-
-        public PrefetchPolicy PrefetchPolicy
-        {
-            get { return this.prefetchPolicy; }
-            set { this.prefetchPolicy = value; }
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Starts asynchronous message delivery of incoming messages for this connection.
-        /// Synchronous delivery is unaffected.
-        /// </summary>
-        public void Start()
-        {
-            CheckConnected();
-            if(started.CompareAndSet(false, true))
-            {
-                lock(sessions.SyncRoot)
-                {
-                    foreach(Session session in sessions)
-                    {
-                        session.Start();
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// This property determines if the asynchronous message delivery of incoming
-        /// messages has been started for this connection.
-        /// </summary>
-        public bool IsStarted
-        {
-            get { return started.Value; }
-        }
-
-        /// <summary>
-        /// Temporarily stop asynchronous delivery of inbound messages for this connection.
-        /// The sending of outbound messages is unaffected.
-        /// </summary>
-        public void Stop()
-        {
-            CheckConnected();
-            if(started.CompareAndSet(true, false))
-            {
-                lock(sessions.SyncRoot)
-                {
-                    foreach(Session session in sessions)
-                    {
-                        session.Stop();
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// Creates a new session to work on this connection
-        /// </summary>
-        public ISession CreateSession()
-        {
-            return CreateSession(acknowledgementMode);
-        }
-
-        /// <summary>
-        /// Creates a new session to work on this connection
-        /// </summary>
-        public ISession CreateSession(AcknowledgementMode sessionAcknowledgementMode)
-        {
-            SessionInfo info = CreateSessionInfo(sessionAcknowledgementMode);
-            Session session = new Session(this, info, sessionAcknowledgementMode, this.dispatchAsync);
-
-            // Set properties on session using parameters prefixed with "session."
-            URISupport.CompositeData c = URISupport.parseComposite(this.brokerUri);
-            URISupport.SetProperties(session, c.Parameters, "session.");
-
-            if(IsStarted)
-            {
-                session.Start();
-            }
-
-            sessions.Add(session);
-            return session;
-        }
-
-        internal void RemoveSession(Session session)
-        {
-            if(!this.closing)
-            {
-                sessions.Remove(session);
-            }
-        }
-
-        internal void addDispatcher( ConsumerId id, IDispatcher dispatcher )
-        {
-            this.dispatchers.Add( id, dispatcher );
-        }
-
-        internal void removeDispatcher( ConsumerId id )
-        {
-            this.dispatchers.Remove( id );
-        }
-
-        public void Close()
-        {
-            lock(myLock)
-            {
-                if(this.closed)
-                {
-                    return;
-                }
-
-                try
-                {
-                    Tracer.Info("Closing Connection.");
-                    this.closing = true;
-                    lock(sessions.SyncRoot)
-                    {
-                        foreach(Session session in sessions)
-                        {
-                            session.DoClose();
-                        }
-                    }
-                    sessions.Clear();
-
-                    if(connected)
-                    {
-                        ShutdownInfo shutdowninfo = new ShutdownInfo();
-                        transport.Oneway(shutdowninfo);
-                    }
-
-                    Tracer.Info("Disposing of the Transport.");
-                    transport.Dispose();
-                }
-                catch(Exception ex)
-                {
-                    Tracer.ErrorFormat("Error during connection close: {0}", ex);
-                }
-                finally
-                {
-                    this.transport = null;
-                    this.closed = true;
-                    this.connected = false;
-                    this.closing = false;
-                }
-            }
-        }
-
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-        }
-
-        protected void Dispose(bool disposing)
-        {
-            if(disposed)
-            {
-                return;
-            }
-
-            if(disposing)
-            {
-                // Dispose managed code here.
-            }
-
-            try
-            {
-                // For now we do not distinguish between Dispose() and Close().
-                // In theory Dispose should possibly be lighter-weight and perform a (faster)
-                // disorderly close.
-                Close();
-            }
-            catch
-            {
-                // Ignore network errors.
-            }
-
-            disposed = true;
-        }
-
-        // Implementation methods
-
-        /// <summary>
-        /// Performs a synchronous request-response with the broker
-        /// </summary>
-        ///
-
-        public Response SyncRequest(Command command)
-        {
-            try
-            {
-                return SyncRequest(command, this.RequestTimeout);
-            }
-            catch(Exception ex)
-            {
-                throw NMSExceptionSupport.Create(ex);
-            }
-        }
-
-        public Response SyncRequest(Command command, TimeSpan requestTimeout)
-        {
-            CheckConnected();
-
-            try
-            {
-                Response response = transport.Request(command, requestTimeout);
-                if(response is ExceptionResponse)
-                {
-                    ExceptionResponse exceptionResponse = (ExceptionResponse) response;
-                    BrokerError brokerError = exceptionResponse.Exception;
-                    throw new BrokerException(brokerError);
-                }
-                return response;
-            }
-            catch(Exception ex)
-            {
-                throw NMSExceptionSupport.Create(ex);
-            }
-        }
-
-        public void Oneway(Command command)
-        {
-            CheckConnected();
-
-            try
-            {
-                transport.Oneway(command);
-            }
-            catch(Exception ex)
-            {
-                throw NMSExceptionSupport.Create(ex);
-            }
-        }
-
-        protected void CheckConnected()
-        {
-            if(closed)
-            {
-                throw new ConnectionClosedException();
-            }
-
-            if(!connected)
-            {
-                if(!this.userSpecifiedClientID)
-                {
-                    this.info.ClientId = this.clientIdGenerator.GenerateId();
-                }
-
-                connected = true;
-                // now lets send the connection and see if we get an ack/nak
-                if(null == SyncRequest(info))
-                {
-                    closed = true;
-                    connected = false;
-                    throw new ConnectionClosedException();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Handle incoming commands
-        /// </summary>
-        /// <param name="commandTransport">An ITransport</param>
-        /// <param name="command">A  Command</param>
-        protected void OnCommand(ITransport commandTransport, Command command)
-        {
-            if(command is MessageDispatch)
-            {
-                DispatchMessage((MessageDispatch) command);
-            }
-            else if(command is ConnectionError)
-            {
-                if(!closing && !closed)
-                {
-                    ConnectionError connectionError = (ConnectionError) command;
-                    BrokerError brokerError = connectionError.Exception;
-                    string message = "Broker connection error.";
-                    string cause = "";
-
-                    if(null != brokerError)
-                    {
-                        message = brokerError.Message;
-                        if(null != brokerError.Cause)
-                        {
-                            cause = brokerError.Cause.Message;
-                        }
-                    }
-
-                    OnException(commandTransport, new NMSConnectionException(message, cause));
-                }
-            }
-            else
-            {
-                Tracer.Error("Unknown command: " + command);
-            }
-        }
-
-        protected void DispatchMessage(MessageDispatch dispatch)
-        {
-            lock(dispatchers.SyncRoot)
-            {
-                if(dispatchers.Contains(dispatch.ConsumerId))
-                {
-                    IDispatcher dispatcher = (IDispatcher) dispatchers[dispatch.ConsumerId];
-
-                    // Can be null when a consumer has sent a MessagePull and there was
-                    // no available message at the broker to dispatch.
-                    if(dispatch.Message != null)
-                    {
-                        dispatch.Message.ReadOnlyBody = true;
-                        dispatch.Message.ReadOnlyProperties = true;
-                        dispatch.Message.RedeliveryCounter = dispatch.RedeliveryCounter;
-                    }
-
-                    dispatcher.Dispatch(dispatch);
-
-                    return;
-                }
-            }
-
-            Tracer.Error("No such consumer active: " + dispatch.ConsumerId);
-        }
-
-        protected void OnException(ITransport sender, Exception exception)
-        {
-            if(ExceptionListener != null && !this.closing)
-            {
-                try
-                {
-                    ExceptionListener(exception);
-                }
-                catch
-                {
-                    sender.Dispose();
-                }
-            }
-        }
-
-        protected void OnTransportInterrupted(ITransport sender)
-        {
-            Tracer.Debug("Transport has been Interrupted.");
-
-            foreach(Session session in this.sessions)
-            {
-                session.ClearMessagesInProgress();
-            }
-
-            if(this.ConnectionInterruptedListener != null && !this.closing )
-            {
-                try
-                {
-                    this.ConnectionInterruptedListener();
-                }
-                catch
-                {
-                }
-            }
-        }
-
-        protected void OnTransportResumed(ITransport sender)
-        {
-            Tracer.Debug("Transport has resumed normal operation.");
-
-            if(this.ConnectionResumedListener != null && !this.closing )
-            {
-                try
-                {
-                    this.ConnectionResumedListener();
-                }
-                catch
-                {
-                }
-            }
-        }
-
-        internal void OnSessionException(Session sender, Exception exception)
-        {
-            if(ExceptionListener != null)
-            {
-                try
-                {
-                    ExceptionListener(exception);
-                }
-                catch
-                {
-                    sender.Close();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Creates a new temporary destination name
-        /// </summary>
-        public String CreateTemporaryDestinationName()
-        {
-            return info.ConnectionId.Value + ":" + Interlocked.Increment(ref temporaryDestinationCounter);
-        }
-
-        /// <summary>
-        /// Creates a new local transaction ID
-        /// </summary>
-        public TransactionId CreateLocalTransactionId()
-        {
-            TransactionId id = new TransactionId();
-            id.ConnectionId = ConnectionId;
-            id.Value = Interlocked.Increment(ref localTransactionCounter);
-            return id;
-        }
-
-        protected SessionInfo CreateSessionInfo(AcknowledgementMode sessionAcknowledgementMode)
-        {
-            SessionInfo answer = new SessionInfo();
-            SessionId sessionId = new SessionId();
-            sessionId.ConnectionId = info.ConnectionId.Value;
-            sessionId.Value = Interlocked.Increment(ref sessionCounter);
-            answer.SessionId = sessionId;
-            return answer;
-        }
-    }
+	/// <summary>
+	/// Represents a connection with a message broker
+	/// </summary>
+	public class Connection : IConnection
+	{
+		private static readonly IdGenerator CONNECTION_ID_GENERATOR = new IdGenerator();
+
+		private readonly Uri brokerUri;
+		private ITransport transport;
+		private readonly ConnectionInfo info;
+
+		private AcknowledgementMode acknowledgementMode = AcknowledgementMode.AutoAcknowledge;
+		private bool asyncSend = false;
+		private bool alwaysSyncSend = false;
+		private bool copyMessageOnSend = true;
+		private bool sendAcksAsync = false;
+		private bool dispatchAsync = true;
+		private string transformation = null;
+		private IRedeliveryPolicy redeliveryPolicy;
+		private PrefetchPolicy prefetchPolicy = new PrefetchPolicy();
+
+		private bool userSpecifiedClientID;
+		private TimeSpan requestTimeout;
+		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 int sessionCounter = 0;
+		private int temporaryDestinationCounter = 0;
+		private int localTransactionCounter;
+		private readonly Atomic<bool> started = new Atomic<bool>(false);
+		private ConnectionMetaData metaData = null;
+		private bool disposed = false;
+		private IdGenerator clientIdGenerator;
+
+		public Connection(Uri connectionUri, ITransport transport, IdGenerator clientIdGenerator)
+		{
+			this.brokerUri = connectionUri;
+			this.requestTimeout = transport.RequestTimeout;
+			this.clientIdGenerator = clientIdGenerator;
+
+			this.transport = transport;
+			this.transport.Command = new CommandHandler(OnCommand);
+			this.transport.Exception = new ExceptionHandler(OnException);
+			this.transport.Interrupted = new InterruptedHandler(OnTransportInterrupted);
+			this.transport.Resumed = new ResumedHandler(OnTransportResumed);
+
+			ConnectionId id = new ConnectionId();
+			id.Value = CONNECTION_ID_GENERATOR.GenerateId();
+
+			this.info = new ConnectionInfo();
+			this.info.ConnectionId = id;
+		}
+
+		~Connection()
+		{
+			Dispose(false);
+		}
+
+		/// <summary>
+		/// A delegate that can receive transport level exceptions.
+		/// </summary>
+		public event ExceptionListener ExceptionListener;
+
+		/// <summary>
+		/// An asynchronous listener that is notified when a Fault tolerant connection
+		/// has been interrupted.
+		/// </summary>
+		public event ConnectionInterruptedListener ConnectionInterruptedListener;
+
+		/// <summary>
+		/// An asynchronous listener that is notified when a Fault tolerant connection
+		/// has been resumed.
+		/// </summary>
+		public event ConnectionResumedListener ConnectionResumedListener;
+
+		#region Properties
+
+		public String UserName
+		{
+			get { return this.info.UserName; }
+			set { this.info.UserName = value; }
+		}
+
+		public String Password
+		{
+			get { return this.info.Password; }
+			set { this.info.Password = value; }
+		}
+
+		/// <summary>
+		/// This property indicates whether or not async send is enabled.
+		/// </summary>
+		public bool AsyncSend
+		{
+			get { return asyncSend; }
+			set { asyncSend = value; }
+		}
+
+		/// <summary>
+		/// This property sets the acknowledgment mode for the connection.
+		/// The URI parameter connection.ackmode can be set to a string value
+		/// that maps to the enumeration value.
+		/// </summary>
+		public string AckMode
+		{
+			set { this.acknowledgementMode = NMSConvert.ToAcknowledgementMode(value); }
+		}
+
+		/// <summary>
+		/// This property forces all messages that are sent to be sent synchronously overriding
+		/// any usage of the AsyncSend flag. This can reduce performance in some cases since the
+		/// only messages we normally send synchronously are Persistent messages not sent in a
+		/// transaction. This options guarantees that no send will return until the broker has
+		/// acknowledge receipt of the message
+		/// </summary>
+		public bool AlwaysSyncSend
+		{
+			get { return alwaysSyncSend; }
+			set { alwaysSyncSend = value; }
+		}
+
+		/// <summary>
+		/// This property indicates whether Message's should be copied before being sent via
+		/// one of the Connection's send methods.  Copying the Message object allows the user
+		/// to resuse the Object over for another send.  If the message isn't copied performance
+		/// can improve but the user must not reuse the Object as it may not have been sent
+		/// before they reset its payload.
+		/// </summary>
+		public bool CopyMessageOnSend
+		{
+			get { return copyMessageOnSend; }
+			set { copyMessageOnSend = value; }
+		}
+
+		/// <summary>
+		/// This property indicates whether or not async sends are used for
+		/// message acknowledgement messages.  Sending Acks async can improve
+		/// performance but may decrease reliability.
+		/// </summary>
+		public bool SendAcksAsync
+		{
+			get { return sendAcksAsync; }
+			set { sendAcksAsync = value; }
+		}
+
+		/// <summary>
+		/// synchronously or asynchronously by the broker.  Set to false for a slow
+		/// consumer and true for a fast consumer.
+		/// </summary>
+		public bool DispatchAsync
+		{
+			get { return this.dispatchAsync; }
+			set { this.dispatchAsync = value; }
+		}
+
+		/// <summary>
+		/// Sets the default Transformation attribute applied to Consumers.  If a consumer
+		/// is to receive Map messages from the Broker then the user should set the "jms-map-xml"
+		/// transformation on the consumer so that all MapMessages are sent as XML.
+		/// </summary>
+		public string Transformation
+		{
+			get { return this.transformation; }
+			set { this.transformation = value; }
+		}
+
+		public IConnectionMetaData MetaData
+		{
+			get { return this.metaData ?? (this.metaData = new ConnectionMetaData()); }
+		}
+
+		public Uri BrokerUri
+		{
+			get { return brokerUri; }
+		}
+
+		public ITransport ITransport
+		{
+			get { return transport; }
+			set { this.transport = value; }
+		}
+
+		public TimeSpan RequestTimeout
+		{
+			get { return this.requestTimeout; }
+			set { this.requestTimeout = value; }
+		}
+
+		public AcknowledgementMode AcknowledgementMode
+		{
+			get { return acknowledgementMode; }
+			set { this.acknowledgementMode = value; }
+		}
+
+		public string ClientId
+		{
+			get { return info.ClientId; }
+			set
+			{
+				if(this.connected)
+				{
+					throw new NMSException("You cannot change the ClientId once the Connection is connected");
+				}
+
+				this.info.ClientId = value;
+				this.userSpecifiedClientID = true;
+				CheckConnected();
+			}
+		}
+
+		/// <summary>
+		/// The Default Client Id used if the ClientId property is not set explicity.
+		/// </summary>
+		public string DefaultClientId
+		{
+			set
+			{
+				this.info.ClientId = value;
+				this.userSpecifiedClientID = true;
+			}
+		}
+
+		public ConnectionId ConnectionId
+		{
+			get { return info.ConnectionId; }
+		}
+
+		/// <summary>
+		/// Get/or set the redelivery policy for this connection.
+		/// </summary>
+		public IRedeliveryPolicy RedeliveryPolicy
+		{
+			get { return this.redeliveryPolicy; }
+			set { this.redeliveryPolicy = value; }
+		}
+
+		public PrefetchPolicy PrefetchPolicy
+		{
+			get { return this.prefetchPolicy; }
+			set { this.prefetchPolicy = value; }
+		}
+
+		#endregion
+
+		/// <summary>
+		/// Starts asynchronous message delivery of incoming messages for this connection.
+		/// Synchronous delivery is unaffected.
+		/// </summary>
+		public void Start()
+		{
+			CheckConnected();
+			if(started.CompareAndSet(false, true))
+			{
+				lock(sessions.SyncRoot)
+				{
+					foreach(Session session in sessions)
+					{
+						session.Start();
+					}
+				}
+			}
+		}
+
+		/// <summary>
+		/// This property determines if the asynchronous message delivery of incoming
+		/// messages has been started for this connection.
+		/// </summary>
+		public bool IsStarted
+		{
+			get { return started.Value; }
+		}
+
+		/// <summary>
+		/// Temporarily stop asynchronous delivery of inbound messages for this connection.
+		/// The sending of outbound messages is unaffected.
+		/// </summary>
+		public void Stop()
+		{
+			CheckConnected();
+			if(started.CompareAndSet(true, false))
+			{
+				lock(sessions.SyncRoot)
+				{
+					foreach(Session session in sessions)
+					{
+						session.Stop();
+					}
+				}
+			}
+		}
+
+		/// <summary>
+		/// Creates a new session to work on this connection
+		/// </summary>
+		public ISession CreateSession()
+		{
+			return CreateSession(acknowledgementMode);
+		}
+
+		/// <summary>
+		/// Creates a new session to work on this connection
+		/// </summary>
+		public ISession CreateSession(AcknowledgementMode sessionAcknowledgementMode)
+		{
+			SessionInfo info = CreateSessionInfo(sessionAcknowledgementMode);
+			Session session = new Session(this, info, sessionAcknowledgementMode, this.dispatchAsync);
+
+			// Set properties on session using parameters prefixed with "session."
+			URISupport.CompositeData c = URISupport.parseComposite(this.brokerUri);
+			URISupport.SetProperties(session, c.Parameters, "session.");
+
+			if(IsStarted)
+			{
+				session.Start();
+			}
+
+			sessions.Add(session);
+			return session;
+		}
+
+		internal void RemoveSession(Session session)
+		{
+			if(!this.closing)
+			{
+				sessions.Remove(session);
+			}
+		}
+
+		internal void addDispatcher(ConsumerId id, IDispatcher dispatcher)
+		{
+			this.dispatchers.Add(id, dispatcher);
+		}
+
+		internal void removeDispatcher(ConsumerId id)
+		{
+			this.dispatchers.Remove(id);
+		}
+
+		public void Close()
+		{
+			lock(myLock)
+			{
+				if(this.closed)
+				{
+					return;
+				}
+
+				try
+				{
+					Tracer.Info("Closing Connection.");
+					this.closing = true;
+					lock(sessions.SyncRoot)
+					{
+						foreach(Session session in sessions)
+						{
+							session.DoClose();
+						}
+					}
+					sessions.Clear();
+
+					if(connected)
+					{
+						ShutdownInfo shutdowninfo = new ShutdownInfo();
+						transport.Oneway(shutdowninfo);
+					}
+
+					Tracer.Info("Disposing of the Transport.");
+					transport.Dispose();
+				}
+				catch(Exception ex)
+				{
+					Tracer.ErrorFormat("Error during connection close: {0}", ex);
+				}
+				finally
+				{
+					this.transport = null;
+					this.closed = true;
+					this.connected = false;
+					this.closing = false;
+				}
+			}
+		}
+
+		public void Dispose()
+		{
+			Dispose(true);
+			GC.SuppressFinalize(this);
+		}
+
+		protected void Dispose(bool disposing)
+		{
+			if(disposed)
+			{
+				return;
+			}
+
+			if(disposing)
+			{
+				// Dispose managed code here.
+			}
+
+			try
+			{
+				// For now we do not distinguish between Dispose() and Close().
+				// In theory Dispose should possibly be lighter-weight and perform a (faster)
+				// disorderly close.
+				Close();
+			}
+			catch
+			{
+				// Ignore network errors.
+			}
+
+			disposed = true;
+		}
+
+		// Implementation methods
+
+		/// <summary>
+		/// Performs a synchronous request-response with the broker
+		/// </summary>
+		///
+
+		public Response SyncRequest(Command command)
+		{
+			try
+			{
+				return SyncRequest(command, this.RequestTimeout);
+			}
+			catch(Exception ex)
+			{
+				throw NMSExceptionSupport.Create(ex);
+			}
+		}
+
+		public Response SyncRequest(Command command, TimeSpan requestTimeout)
+		{
+			CheckConnected();
+
+			try
+			{
+				Response response = transport.Request(command, requestTimeout);
+				if(response is ExceptionResponse)
+				{
+					ExceptionResponse exceptionResponse = (ExceptionResponse) response;
+					BrokerError brokerError = exceptionResponse.Exception;
+					throw new BrokerException(brokerError);
+				}
+				return response;
+			}
+			catch(Exception ex)
+			{
+				throw NMSExceptionSupport.Create(ex);
+			}
+		}
+
+		public void Oneway(Command command)
+		{
+			CheckConnected();
+
+			try
+			{
+				transport.Oneway(command);
+			}
+			catch(Exception ex)
+			{
+				throw NMSExceptionSupport.Create(ex);
+			}
+		}
+
+		protected void CheckConnected()
+		{
+			if(closed)
+			{
+				throw new ConnectionClosedException();
+			}
+
+			if(!connected)
+			{
+				if(!this.userSpecifiedClientID)
+				{
+					this.info.ClientId = this.clientIdGenerator.GenerateId();
+				}
+
+				connected = true;
+				// now lets send the connection and see if we get an ack/nak
+				if(null == SyncRequest(info))
+				{
+					closed = true;
+					connected = false;
+					throw new ConnectionClosedException();
+				}
+			}
+		}
+
+		/// <summary>
+		/// Handle incoming commands
+		/// </summary>
+		/// <param name="commandTransport">An ITransport</param>
+		/// <param name="command">A  Command</param>
+		protected void OnCommand(ITransport commandTransport, Command command)
+		{
+			if(command is MessageDispatch)
+			{
+				DispatchMessage((MessageDispatch) command);
+			}
+			else if(command is ConnectionError)
+			{
+				if(!closing && !closed)
+				{
+					ConnectionError connectionError = (ConnectionError) command;
+					BrokerError brokerError = connectionError.Exception;
+					string message = "Broker connection error.";
+					string cause = "";
+
+					if(null != brokerError)
+					{
+						message = brokerError.Message;
+						if(null != brokerError.Cause)
+						{
+							cause = brokerError.Cause.Message;
+						}
+					}
+
+					OnException(commandTransport, new NMSConnectionException(message, cause));
+				}
+			}
+			else
+			{
+				Tracer.Error("Unknown command: " + command);
+			}
+		}
+
+		protected void DispatchMessage(MessageDispatch dispatch)
+		{
+			lock(dispatchers.SyncRoot)
+			{
+				if(dispatchers.Contains(dispatch.ConsumerId))
+				{
+					IDispatcher dispatcher = (IDispatcher) dispatchers[dispatch.ConsumerId];
+
+					// Can be null when a consumer has sent a MessagePull and there was
+					// no available message at the broker to dispatch.
+					if(dispatch.Message != null)
+					{
+						dispatch.Message.ReadOnlyBody = true;
+						dispatch.Message.ReadOnlyProperties = true;
+						dispatch.Message.RedeliveryCounter = dispatch.RedeliveryCounter;
+					}
+
+					dispatcher.Dispatch(dispatch);
+
+					return;
+				}
+			}
+
+			Tracer.Error("No such consumer active: " + dispatch.ConsumerId);
+		}
+
+		protected void OnException(ITransport sender, Exception exception)
+		{
+			if(ExceptionListener != null && !this.closing)
+			{
+				try
+				{
+					ExceptionListener(exception);
+				}
+				catch
+				{
+					sender.Dispose();
+				}
+			}
+		}
+
+		protected void OnTransportInterrupted(ITransport sender)
+		{
+			Tracer.Debug("Transport has been Interrupted.");
+
+			foreach(Session session in this.sessions)
+			{
+				session.ClearMessagesInProgress();
+			}
+
+			if(this.ConnectionInterruptedListener != null && !this.closing)
+			{
+				try
+				{
+					this.ConnectionInterruptedListener();
+				}
+				catch
+				{
+				}
+			}
+		}
+
+		protected void OnTransportResumed(ITransport sender)
+		{
+			Tracer.Debug("Transport has resumed normal operation.");
+
+			if(this.ConnectionResumedListener != null && !this.closing)
+			{
+				try
+				{
+					this.ConnectionResumedListener();
+				}
+				catch
+				{
+				}
+			}
+		}
+
+		internal void OnSessionException(Session sender, Exception exception)
+		{
+			if(ExceptionListener != null)
+			{
+				try
+				{
+					ExceptionListener(exception);
+				}
+				catch
+				{
+					sender.Close();
+				}
+			}
+		}
+
+		/// <summary>
+		/// Creates a new temporary destination name
+		/// </summary>
+		public String CreateTemporaryDestinationName()
+		{
+			return info.ConnectionId.Value + ":" + Interlocked.Increment(ref temporaryDestinationCounter);
+		}
+
+		/// <summary>
+		/// Creates a new local transaction ID
+		/// </summary>
+		public TransactionId CreateLocalTransactionId()
+		{
+			TransactionId id = new TransactionId();
+			id.ConnectionId = ConnectionId;
+			id.Value = Interlocked.Increment(ref localTransactionCounter);
+			return id;
+		}
+
+		protected SessionInfo CreateSessionInfo(AcknowledgementMode sessionAcknowledgementMode)
+		{
+			SessionInfo answer = new SessionInfo();
+			SessionId sessionId = new SessionId();
+			sessionId.ConnectionId = info.ConnectionId.Value;
+			sessionId.Value = Interlocked.Increment(ref sessionCounter);
+			answer.SessionId = sessionId;
+			return answer;
+		}
+	}
 }

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionClosedException.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionClosedException.cs?rev=908227&r1=908226&r2=908227&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionClosedException.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionClosedException.cs Tue Feb  9 21:17:20 2010
@@ -14,17 +14,58 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-using Apache.NMS;
+
+using System;
 
 namespace Apache.NMS.Stomp
 {
-    /// <summary>
-    /// Exception thrown when a connection is used that it already closed
-    /// </summary>
-    public class ConnectionClosedException : NMSException
-    {
-        public ConnectionClosedException() : base("The connection is already closed!")
-        {
-        }
-    }
+	/// <summary>
+	/// Exception thrown when a connection is used that it already closed
+	/// </summary>
+	[Serializable]
+	public class ConnectionClosedException : NMSException
+	{
+		public ConnectionClosedException()
+			: base("The connection is already closed!")
+		{
+		}
+
+		public ConnectionClosedException(string message)
+			: base(message)
+		{
+		}
+
+		public ConnectionClosedException(string message, string errorCode)
+			: base(message, errorCode)
+		{
+		}
+
+		public ConnectionClosedException(string message, Exception innerException)
+			: base(message, innerException)
+		{
+		}
+
+		public ConnectionClosedException(string message, string errorCode, Exception innerException)
+			: base(message, errorCode, innerException)
+		{
+		}
+
+		#region ISerializable interface implementation
+#if !NETCF
+
+		/// <summary>
+		/// Initializes a new instance of the ConnectionClosedException class with serialized data.
+		/// Throws System.ArgumentNullException if the info parameter is null.
+		/// Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
+		/// </summary>
+		/// <param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
+		/// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
+		protected ConnectionClosedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
+			: base(info, context)
+		{
+		}
+
+#endif
+		#endregion
+	}
 }

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj?rev=908227&r1=908226&r2=908227&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj Tue Feb  9 21:17:20 2010
@@ -1,110 +1,137 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{E8C995C3-FF81-491B-A3B7-9D7C753BDDC3}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AssemblyName>vs2008-stomp-test</AssemblyName>
-    <RootNamespace>Apache.NMS.Stomp.Test</RootNamespace>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>none</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Release</OutputPath>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Xml" />
-    <Reference Include="System.Data" />
-    <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>lib\NUnit\mono-2.0\nunit.framework.dll</HintPath>
-    </Reference>
-    <Reference Include="nunit.framework.extensions, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>lib\NUnit\mono-2.0\nunit.framework.extensions.dll</HintPath>
-    </Reference>
-    <Reference Include="Apache.NMS.Test, Version=1.3.0.1809, Culture=neutral, PublicKeyToken=82756feee3957618">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>lib\Apache.NMS\mono-2.0\Apache.NMS.Test.dll</HintPath>
-    </Reference>
-    <Reference Include="Apache.NMS, Version=1.3.0.1809, Culture=neutral, PublicKeyToken=82756feee3957618">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>lib\Apache.NMS\mono-2.0\Apache.NMS.dll</HintPath>
-    </Reference>
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <ItemGroup>
-    <ProjectReference Include="vs2008-stomp.csproj">
-      <Project>{AA51947C-1370-44DC-8692-1C8EFC5945F7}</Project>
-      <Name>vs2008-stomp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="nmsprovider-test.config" />
-    <None Include="LICENSE.txt" />
-    <None Include="keyfile\NMSKey.snk" />
-    <None Include="Apache.NMS.Stomp.Test.nunit" />
-  </ItemGroup>
-  <ProjectExtensions>
-    <MonoDevelop>
-      <Properties>
-        <Policies>
-          <TextStylePolicy FileWidth="120" RemoveTrailingWhitespace="True" inheritsSet="VisualStudio" inheritsScope="text/plain" />
-          <StandardHeader Text="/*&#xA; * Licensed to the Apache Software Foundation (ASF) under one or more&#xA; * contributor license agreements.  See the NOTICE file distributed with&#xA; * this work for additional information regarding copyright ownership.&#xA; * The ASF licenses this file to You under the Apache License, Version 2.0&#xA; * (the &quot;License&quot;); you may not use this file except in compliance with&#xA; * the License.  You may obtain a copy of the License at&#xA; *&#xA; *     http://www.apache.org/licenses/LICENSE-2.0&#xA; *&#xA; * Unless required by applicable law or agreed to in writing, software&#xA; * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#xA; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xA; * See the License for the specific language governing permissions and&#xA; * limitations under the License.&#xA; */&#xA;" inheritsSet="MITX11License" />
-        </Policies>
-      </Properties>
-    </MonoDevelop>
-  </ProjectExtensions>
-  <ItemGroup>
-    <Compile Include="src\test\csharp\StompHelperTest.cs" />
-    <Compile Include="src\test\csharp\AsyncConsumeTest.cs" />
-    <Compile Include="src\test\csharp\BadConsumeTest.cs" />
-    <Compile Include="src\test\csharp\BytesMessageTest.cs" />
-    <Compile Include="src\test\csharp\ConnectionTest.cs" />
-    <Compile Include="src\test\csharp\MessageTest.cs" />
-    <Compile Include="src\test\csharp\ProducerTest.cs" />
-    <Compile Include="src\test\csharp\TextMessageTest.cs" />
-    <Compile Include="src\test\csharp\ConsumerTest.cs" />
-    <Compile Include="src\test\csharp\DurableTest.cs" />
-    <Compile Include="src\test\csharp\NMSPropertyTest.cs" />
-    <Compile Include="src\test\csharp\TempDestinationTest.cs" />
-    <Compile Include="src\test\csharp\TransactionTest.cs" />
-    <Compile Include="src\test\csharp\StompRedeliveryPolicyTest.cs" />
-    <Compile Include="src\test\csharp\IndividualAckTest.cs" />
-    <Compile Include="src\test\csharp\ExclusiveConsumerTest.cs" />
-    <Compile Include="src\test\csharp\Util\MessageDispatchChannelTest.cs" />
-    <Compile Include="src\test\csharp\MessageListenerRedeliveryTest.cs" />
-    <Compile Include="src\test\csharp\StompTopicTransactionTest.cs" />
-    <Compile Include="src\test\csharp\StompTransactionTestSupport.cs" />
-    <Compile Include="src\test\csharp\StompQueueTransactionTest.cs" />
-    <Compile Include="src\test\csharp\Commands\BytesMessageTest.cs" />
-    <Compile Include="src\test\csharp\Commands\CommandTest.cs" />
-    <Compile Include="src\test\csharp\Commands\MessageTest.cs" />
-    <Compile Include="src\test\csharp\Commands\TextMessageTest.cs" />
-    <Compile Include="src\test\csharp\NMSConnectionFactoryTest.cs" />
-    <Compile Include="src\test\csharp\Threads\DedicatedTaskRunnerTest.cs" />
-    <Compile Include="src\test\csharp\Commands\MapMessageTest.cs" />
-    <Compile Include="src\test\csharp\Protocol\XmlPrimitiveMapMarshalerTest.cs" />
-    <Compile Include="src\test\csharp\MapMessageTest.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="src\test\csharp\Protocol\" />
-  </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{E8C995C3-FF81-491B-A3B7-9D7C753BDDC3}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AssemblyName>Apache.NMS.Stomp.Test</AssemblyName>
+    <RootNamespace>Apache.NMS.Stomp.Test</RootNamespace>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>2.0</OldToolsVersion>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>keyfile\NMSKey.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>build\net-2.0\debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;NET,NET_2_0</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>build\net-2.0\release\</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <DefineConstants>NET,NET_2_0</DefineConstants>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Apache.NMS, Version=1.3.0.1865, 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.3.0.1865, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>lib\Apache.NMS\net-2.0\Apache.NMS.Test.dll</HintPath>
+    </Reference>
+    <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>lib\NUnit\net-2.0\nunit.framework.dll</HintPath>
+    </Reference>
+    <Reference Include="nunit.framework.extensions, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>lib\NUnit\net-2.0\nunit.framework.extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+      <Visible>False</Visible>
+      <ProductName>Microsoft.Net.Framework.2.0</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <ProjectReference Include="vs2008-stomp.csproj">
+      <Project>{AA51947C-1370-44DC-8692-1C8EFC5945F7}</Project>
+      <Name>vs2008-stomp</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="nmsprovider-test.config" />
+    <None Include="LICENSE.txt" />
+    <None Include="keyfile\NMSKey.snk" />
+    <None Include="Apache.NMS.Stomp.Test.nunit" />
+  </ItemGroup>
+  <ProjectExtensions>
+    <MonoDevelop>
+      <Properties>
+        <Policies>
+          <TextStylePolicy FileWidth="120" RemoveTrailingWhitespace="True" inheritsSet="VisualStudio" inheritsScope="text/plain" />
+          <StandardHeader Text="/*&#xA; * Licensed to the Apache Software Foundation (ASF) under one or more&#xA; * contributor license agreements.  See the NOTICE file distributed with&#xA; * this work for additional information regarding copyright ownership.&#xA; * The ASF licenses this file to You under the Apache License, Version 2.0&#xA; * (the &quot;License&quot;); you may not use this file except in compliance with&#xA; * the License.  You may obtain a copy of the License at&#xA; *&#xA; *     http://www.apache.org/licenses/LICENSE-2.0&#xA; *&#xA; * Unless required by applicable law or agreed to in writing, software&#xA; * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#xA; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xA; * See the License for the specific language governing permissions and&#xA; * limitations under the License.&#xA; */&#xA;" inheritsSet="MITX11License" />
+        </Policies>
+      </Properties>
+    </MonoDevelop>
+    <VisualStudio />
+  </ProjectExtensions>
+  <ItemGroup>
+    <Compile Include="src\test\csharp\StompHelperTest.cs" />
+    <Compile Include="src\test\csharp\AsyncConsumeTest.cs" />
+    <Compile Include="src\test\csharp\BadConsumeTest.cs" />
+    <Compile Include="src\test\csharp\BytesMessageTest.cs" />
+    <Compile Include="src\test\csharp\ConnectionTest.cs" />
+    <Compile Include="src\test\csharp\MessageTest.cs" />
+    <Compile Include="src\test\csharp\ProducerTest.cs" />
+    <Compile Include="src\test\csharp\TextMessageTest.cs" />
+    <Compile Include="src\test\csharp\ConsumerTest.cs" />
+    <Compile Include="src\test\csharp\DurableTest.cs" />
+    <Compile Include="src\test\csharp\NMSPropertyTest.cs" />
+    <Compile Include="src\test\csharp\TempDestinationTest.cs" />
+    <Compile Include="src\test\csharp\TransactionTest.cs" />
+    <Compile Include="src\test\csharp\StompRedeliveryPolicyTest.cs" />
+    <Compile Include="src\test\csharp\IndividualAckTest.cs" />
+    <Compile Include="src\test\csharp\ExclusiveConsumerTest.cs" />
+    <Compile Include="src\test\csharp\Util\MessageDispatchChannelTest.cs" />
+    <Compile Include="src\test\csharp\MessageListenerRedeliveryTest.cs" />
+    <Compile Include="src\test\csharp\StompTopicTransactionTest.cs" />
+    <Compile Include="src\test\csharp\StompTransactionTestSupport.cs" />
+    <Compile Include="src\test\csharp\StompQueueTransactionTest.cs" />
+    <Compile Include="src\test\csharp\Commands\BytesMessageTest.cs" />
+    <Compile Include="src\test\csharp\Commands\CommandTest.cs" />
+    <Compile Include="src\test\csharp\Commands\MessageTest.cs" />
+    <Compile Include="src\test\csharp\Commands\TextMessageTest.cs" />
+    <Compile Include="src\test\csharp\NMSConnectionFactoryTest.cs" />
+    <Compile Include="src\test\csharp\Threads\DedicatedTaskRunnerTest.cs" />
+    <Compile Include="src\test\csharp\Commands\MapMessageTest.cs" />
+    <Compile Include="src\test\csharp\Protocol\XmlPrimitiveMapMarshalerTest.cs" />
+    <Compile Include="src\test\csharp\MapMessageTest.cs" />
+  </ItemGroup>
 </Project>
\ No newline at end of file

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj?rev=908227&r1=908226&r2=908227&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj Tue Feb  9 21:17:20 2010
@@ -1,132 +1,163 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{AA51947C-1370-44DC-8692-1C8EFC5945F7}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AssemblyName>Apache.NMS.Stomp</AssemblyName>
-    <RootNamespace>Apache.NMS.Stomp</RootNamespace>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\net-2.0\debug</OutputPath>
-    <DefineConstants>TRACE;DEBUG;NET,NET_2_0</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>none</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\net-2.0\release</OutputPath>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
-    <DefineConstants>TRACE;NET,NET_2_0</DefineConstants>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="Apache.NMS, Version=1.3.0.1809, Culture=neutral, PublicKeyToken=82756feee3957618">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\NMS\build\mono-2.0\debug\Apache.NMS.dll</HintPath>
-    </Reference>
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <ItemGroup>
-    <Compile Include="src\main\csharp\Commands\BaseCommand.cs" />
-    <Compile Include="src\main\csharp\Commands\BaseDataStructure.cs" />
-    <Compile Include="src\main\csharp\Commands\BrokerError.cs" />
-    <Compile Include="src\main\csharp\Commands\Command.cs" />
-    <Compile Include="src\main\csharp\Commands\ConnectionId.cs" />
-    <Compile Include="src\main\csharp\Commands\ConnectionInfo.cs" />
-    <Compile Include="src\main\csharp\Commands\ConsumerId.cs" />
-    <Compile Include="src\main\csharp\Commands\ConsumerInfo.cs" />
-    <Compile Include="src\main\csharp\Commands\DataStructure.cs" />
-    <Compile Include="src\main\csharp\Commands\ExceptionResponse.cs" />
-    <Compile Include="src\main\csharp\Commands\MarshallAware.cs" />
-    <Compile Include="src\main\csharp\Commands\BaseMessage.cs" />
-    <Compile Include="src\main\csharp\Commands\MessageAck.cs" />
-    <Compile Include="src\main\csharp\Commands\MessageId.cs" />
-    <Compile Include="src\main\csharp\Commands\ProducerId.cs" />
-    <Compile Include="src\main\csharp\Commands\ProducerInfo.cs" />
-    <Compile Include="src\main\csharp\Commands\RemoveInfo.cs" />
-    <Compile Include="src\main\csharp\Commands\Response.cs" />
-    <Compile Include="src\main\csharp\Commands\SessionId.cs" />
-    <Compile Include="src\main\csharp\Commands\SessionInfo.cs" />
-    <Compile Include="src\main\csharp\Commands\BytesMessage.cs" />
-    <Compile Include="src\main\csharp\Commands\Destination.cs" />
-    <Compile Include="src\main\csharp\Commands\MapMessage.cs" />
-    <Compile Include="src\main\csharp\Commands\Message.cs" />
-    <Compile Include="src\main\csharp\Commands\Queue.cs" />
-    <Compile Include="src\main\csharp\Commands\StreamMessage.cs" />
-    <Compile Include="src\main\csharp\Commands\TempDestination.cs" />
-    <Compile Include="src\main\csharp\Commands\TempQueue.cs" />
-    <Compile Include="src\main\csharp\Commands\TempTopic.cs" />
-    <Compile Include="src\main\csharp\Commands\TextMessage.cs" />
-    <Compile Include="src\main\csharp\Commands\Topic.cs" />
-    <Compile Include="src\main\csharp\Commands\SubscriptionInfo.cs" />
-    <Compile Include="src\main\csharp\Commands\TransactionId.cs" />
-    <Compile Include="src\main\csharp\Commands\TransactionInfo.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\Transport\Tcp\TcpTransport.cs" />
-    <Compile Include="src\main\csharp\Transport\Tcp\TcpTransportFactory.cs" />
-    <Compile Include="src\main\csharp\Transport\FutureResponse.cs" />
-    <Compile Include="src\main\csharp\Transport\ITransport.cs" />
-    <Compile Include="src\main\csharp\Transport\ITransportFactory.cs" />
-    <Compile Include="src\main\csharp\Transport\IWireFormat.cs" />
-    <Compile Include="src\main\csharp\Transport\LoggingTransport.cs" />
-    <Compile Include="src\main\csharp\Transport\MutexTransport.cs" />
-    <Compile Include="src\main\csharp\Transport\ResponseCorrelator.cs" />
-    <Compile Include="src\main\csharp\Transport\TransportFactory.cs" />
-    <Compile Include="src\main\csharp\Transport\TransportFilter.cs" />
-    <Compile Include="src\main\csharp\Util\MessageDispatchChannel.cs" />
-    <Compile Include="src\main\csharp\CommonAssemblyInfo.cs" />
-    <Compile Include="src\main\csharp\Connection.cs" />
-    <Compile Include="src\main\csharp\ConnectionFactory.cs" />
-    <Compile Include="src\main\csharp\ConnectionMetaData.cs" />
-    <Compile Include="src\main\csharp\Commands\MessageDispatch.cs" />
-    <Compile Include="src\main\csharp\Commands\ShutdownInfo.cs" />
-    <Compile Include="src\main\csharp\IDispatcher.cs" />
-    <Compile Include="src\main\csharp\ISynchronization.cs" />
-    <Compile Include="src\main\csharp\MessageConsumer.cs" />
-    <Compile Include="src\main\csharp\MessageProducer.cs" />
-    <Compile Include="src\main\csharp\PrefetchPolicy.cs" />
-    <Compile Include="src\main\csharp\Session.cs" />
-    <Compile Include="src\main\csharp\SessionExecutor.cs" />
-    <Compile Include="src\main\csharp\TransactionContext.cs" />
-    <Compile Include="src\main\csharp\Threads\DedicatedTaskRunner.cs" />
-    <Compile Include="src\main\csharp\Threads\Task.cs" />
-    <Compile Include="src\main\csharp\Threads\TaskRunner.cs" />
-    <Compile Include="src\main\csharp\Commands\DataStructureTypes.cs" />
-    <Compile Include="src\main\csharp\BrokerException.cs" />
-    <Compile Include="src\main\csharp\ConnectionClosedException.cs" />
-    <Compile Include="src\main\csharp\Commands\ConnectionError.cs" />
-    <Compile Include="src\main\csharp\Commands\RemoveSubscriptionInfo.cs" />
-    <Compile Include="src\main\csharp\Protocol\StompFrame.cs" />
-    <Compile Include="src\main\csharp\Protocol\IPrimitiveMapMarshaler.cs" />
-    <Compile Include="src\main\csharp\Protocol\XmlPrimitiveMapMarshaler.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="keyfile\NMSKey.snk" />
-    <None Include="NOTICE.txt" />
-    <None Include="LICENSE.txt" />
-  </ItemGroup>
-  <ProjectExtensions>
-    <MonoDevelop>
-      <Properties>
-        <Policies>
-          <TextStylePolicy FileWidth="120" RemoveTrailingWhitespace="True" inheritsSet="VisualStudio" inheritsScope="text/plain" />
-          <StandardHeader Text="/*&#xA; * Licensed to the Apache Software Foundation (ASF) under one or more&#xA; * contributor license agreements.  See the NOTICE file distributed with&#xA; * this work for additional information regarding copyright ownership.&#xA; * The ASF licenses this file to You under the Apache License, Version 2.0&#xA; * (the &quot;License&quot;); you may not use this file except in compliance with&#xA; * the License.  You may obtain a copy of the License at&#xA; *&#xA; *     http://www.apache.org/licenses/LICENSE-2.0&#xA; *&#xA; * Unless required by applicable law or agreed to in writing, software&#xA; * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#xA; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xA; * See the License for the specific language governing permissions and&#xA; * limitations under the License.&#xA; */&#xA;" inheritsSet="MITX11License" />
-        </Policies>
-      </Properties>
-    </MonoDevelop>
-  </ProjectExtensions>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{AA51947C-1370-44DC-8692-1C8EFC5945F7}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AssemblyName>Apache.NMS.Stomp</AssemblyName>
+    <RootNamespace>Apache.NMS.Stomp</RootNamespace>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>2.0</OldToolsVersion>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>keyfile\NMSKey.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>build\net-2.0\debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;NET,NET_2_0</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>build\net-2.0\release\</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <DefineConstants>TRACE;NET,NET_2_0</DefineConstants>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Apache.NMS, Version=1.3.0.1865, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>lib\Apache.NMS\net-2.0\Apache.NMS.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+      <Visible>False</Visible>
+      <ProductName>Microsoft.Net.Framework.2.0</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <Compile Include="src\main\csharp\Commands\BaseCommand.cs" />
+    <Compile Include="src\main\csharp\Commands\BaseDataStructure.cs" />
+    <Compile Include="src\main\csharp\Commands\BrokerError.cs" />
+    <Compile Include="src\main\csharp\Commands\Command.cs" />
+    <Compile Include="src\main\csharp\Commands\ConnectionId.cs" />
+    <Compile Include="src\main\csharp\Commands\ConnectionInfo.cs" />
+    <Compile Include="src\main\csharp\Commands\ConsumerId.cs" />
+    <Compile Include="src\main\csharp\Commands\ConsumerInfo.cs" />
+    <Compile Include="src\main\csharp\Commands\DataStructure.cs" />
+    <Compile Include="src\main\csharp\Commands\ExceptionResponse.cs" />
+    <Compile Include="src\main\csharp\Commands\MarshallAware.cs" />
+    <Compile Include="src\main\csharp\Commands\BaseMessage.cs" />
+    <Compile Include="src\main\csharp\Commands\MessageAck.cs" />
+    <Compile Include="src\main\csharp\Commands\MessageId.cs" />
+    <Compile Include="src\main\csharp\Commands\ProducerId.cs" />
+    <Compile Include="src\main\csharp\Commands\ProducerInfo.cs" />
+    <Compile Include="src\main\csharp\Commands\RemoveInfo.cs" />
+    <Compile Include="src\main\csharp\Commands\Response.cs" />
+    <Compile Include="src\main\csharp\Commands\SessionId.cs" />
+    <Compile Include="src\main\csharp\Commands\SessionInfo.cs" />
+    <Compile Include="src\main\csharp\Commands\BytesMessage.cs" />
+    <Compile Include="src\main\csharp\Commands\Destination.cs" />
+    <Compile Include="src\main\csharp\Commands\MapMessage.cs" />
+    <Compile Include="src\main\csharp\Commands\Message.cs" />
+    <Compile Include="src\main\csharp\Commands\Queue.cs" />
+    <Compile Include="src\main\csharp\Commands\StreamMessage.cs" />
+    <Compile Include="src\main\csharp\Commands\TempDestination.cs" />
+    <Compile Include="src\main\csharp\Commands\TempQueue.cs" />
+    <Compile Include="src\main\csharp\Commands\TempTopic.cs" />
+    <Compile Include="src\main\csharp\Commands\TextMessage.cs" />
+    <Compile Include="src\main\csharp\Commands\Topic.cs" />
+    <Compile Include="src\main\csharp\Commands\SubscriptionInfo.cs" />
+    <Compile Include="src\main\csharp\Commands\TransactionId.cs" />
+    <Compile Include="src\main\csharp\Commands\TransactionInfo.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\Transport\Tcp\TcpTransport.cs" />
+    <Compile Include="src\main\csharp\Transport\Tcp\TcpTransportFactory.cs" />
+    <Compile Include="src\main\csharp\Transport\FutureResponse.cs" />
+    <Compile Include="src\main\csharp\Transport\ITransport.cs" />
+    <Compile Include="src\main\csharp\Transport\ITransportFactory.cs" />
+    <Compile Include="src\main\csharp\Transport\IWireFormat.cs" />
+    <Compile Include="src\main\csharp\Transport\LoggingTransport.cs" />
+    <Compile Include="src\main\csharp\Transport\MutexTransport.cs" />
+    <Compile Include="src\main\csharp\Transport\ResponseCorrelator.cs" />
+    <Compile Include="src\main\csharp\Transport\TransportFactory.cs" />
+    <Compile Include="src\main\csharp\Transport\TransportFilter.cs" />
+    <Compile Include="src\main\csharp\Util\IdGenerator.cs" />
+    <Compile Include="src\main\csharp\Util\MessageDispatchChannel.cs" />
+    <Compile Include="src\main\csharp\CommonAssemblyInfo.cs" />
+    <Compile Include="src\main\csharp\Connection.cs" />
+    <Compile Include="src\main\csharp\ConnectionFactory.cs" />
+    <Compile Include="src\main\csharp\ConnectionMetaData.cs" />
+    <Compile Include="src\main\csharp\Commands\MessageDispatch.cs" />
+    <Compile Include="src\main\csharp\Commands\ShutdownInfo.cs" />
+    <Compile Include="src\main\csharp\IDispatcher.cs" />
+    <Compile Include="src\main\csharp\ISynchronization.cs" />
+    <Compile Include="src\main\csharp\MessageConsumer.cs" />
+    <Compile Include="src\main\csharp\MessageProducer.cs" />
+    <Compile Include="src\main\csharp\PrefetchPolicy.cs" />
+    <Compile Include="src\main\csharp\Session.cs" />
+    <Compile Include="src\main\csharp\SessionExecutor.cs" />
+    <Compile Include="src\main\csharp\TransactionContext.cs" />
+    <Compile Include="src\main\csharp\Threads\DedicatedTaskRunner.cs" />
+    <Compile Include="src\main\csharp\Threads\Task.cs" />
+    <Compile Include="src\main\csharp\Threads\TaskRunner.cs" />
+    <Compile Include="src\main\csharp\Commands\DataStructureTypes.cs" />
+    <Compile Include="src\main\csharp\BrokerException.cs" />
+    <Compile Include="src\main\csharp\ConnectionClosedException.cs" />
+    <Compile Include="src\main\csharp\Commands\ConnectionError.cs" />
+    <Compile Include="src\main\csharp\Commands\RemoveSubscriptionInfo.cs" />
+    <Compile Include="src\main\csharp\Protocol\StompFrame.cs" />
+    <Compile Include="src\main\csharp\Protocol\IPrimitiveMapMarshaler.cs" />
+    <Compile Include="src\main\csharp\Protocol\XmlPrimitiveMapMarshaler.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="keyfile\NMSKey.snk" />
+    <None Include="NOTICE.txt" />
+    <None Include="LICENSE.txt" />
+  </ItemGroup>
+  <ProjectExtensions>
+    <MonoDevelop>
+      <Properties>
+        <Policies>
+          <TextStylePolicy FileWidth="120" RemoveTrailingWhitespace="True" inheritsSet="VisualStudio" inheritsScope="text/plain" />
+          <StandardHeader Text="/*&#xA; * Licensed to the Apache Software Foundation (ASF) under one or more&#xA; * contributor license agreements.  See the NOTICE file distributed with&#xA; * this work for additional information regarding copyright ownership.&#xA; * The ASF licenses this file to You under the Apache License, Version 2.0&#xA; * (the &quot;License&quot;); you may not use this file except in compliance with&#xA; * the License.  You may obtain a copy of the License at&#xA; *&#xA; *     http://www.apache.org/licenses/LICENSE-2.0&#xA; *&#xA; * Unless required by applicable law or agreed to in writing, software&#xA; * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#xA; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xA; * See the License for the specific language governing permissions and&#xA; * limitations under the License.&#xA; */&#xA;" inheritsSet="MITX11License" />
+        </Policies>
+      </Properties>
+    </MonoDevelop>
+    <VisualStudio />
+  </ProjectExtensions>
 </Project>
\ No newline at end of file

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.sln
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.sln?rev=908227&r1=908226&r2=908227&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.sln (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.sln Tue Feb  9 21:17:20 2010
@@ -1,6 +1,6 @@
 
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vs2008-stomp", "vs2008-stomp.csproj", "{AA51947C-1370-44DC-8692-1C8EFC5945F7}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vs2008-stomp-test", "vs2008-stomp-test.csproj", "{E8C995C3-FF81-491B-A3B7-9D7C753BDDC3}"
@@ -20,6 +20,9 @@
 		{E8C995C3-FF81-491B-A3B7-9D7C753BDDC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E8C995C3-FF81-491B-A3B7-9D7C753BDDC3}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
 	GlobalSection(MonoDevelopProperties) = preSolution
 		version = 0.1
 		StartupItem = vs2008-stomp.csproj



Mime
View raw message