Author: jgomes
Date: Tue Feb  9 19:58:20 2010
New Revision: 908186

URL: http://svn.apache.org/viewvc?rev=908186&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/trunk/src/main/csharp/IllegalStateException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidClientIDException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidSelectorException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageEOFException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageFormatException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotReadableException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotWriteableException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionException.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ResourceAllocationException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionInProgressException.cs
    
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionRolledBackException.cs

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IllegalStateException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IllegalStateException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IllegalStateException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IllegalStateException.cs
 Tue Feb  9 19:58:20 2010
@@ -18,9 +18,11 @@
 */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
+       [Serializable]
        public class IllegalStateException : NMSException
        {
                public IllegalStateException()
@@ -47,5 +49,21 @@
                        : base(message, errorCode, innerException)
                {
                }
+
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the IllegalStateException 
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 IllegalStateException(SerializationInfo info, 
StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
        }
 }

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidClientIDException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidClientIDException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidClientIDException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidClientIDException.cs
 Tue Feb  9 19:58:20 2010
@@ -18,9 +18,11 @@
 */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
+       [Serializable]
        public class InvalidClientIDException : NMSException
        {
                public InvalidClientIDException()
@@ -47,5 +49,21 @@
                        : base(message, errorCode, innerException)
                {
                }
+
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the InvalidClientIDException 
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 InvalidClientIDException(SerializationInfo info, 
StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
        }
 }

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs
 Tue Feb  9 19:58:20 2010
@@ -15,12 +15,14 @@
  * limitations under the License.
  */
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
        /// <summary>
        /// An attempt is made to access an invalid destination
        /// </summary>
+       [Serializable]
        public class InvalidDestinationException : NMSException
        {
                public InvalidDestinationException()
@@ -47,6 +49,22 @@
                        : base(message, errorCode, innerException)
                {
                }
+
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the 
InvalidDestinationException 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 InvalidDestinationException(SerializationInfo info, 
StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
        }
 }
 

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidSelectorException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidSelectorException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidSelectorException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidSelectorException.cs
 Tue Feb  9 19:58:20 2010
@@ -18,9 +18,11 @@
 */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
+       [Serializable]
        public class InvalidSelectorException : NMSException
        {
                public InvalidSelectorException()
@@ -47,5 +49,21 @@
                        : base(message, errorCode, innerException)
                {
                }
+
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the InvalidSelectorException 
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 InvalidSelectorException(SerializationInfo info, 
StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
        }
 }

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageEOFException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageEOFException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageEOFException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageEOFException.cs
 Tue Feb  9 19:58:20 2010
@@ -18,9 +18,11 @@
 */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
+       [Serializable]
        public class MessageEOFException : NMSException
        {
                public MessageEOFException()
@@ -47,5 +49,21 @@
                        : base(message, errorCode, innerException)
                {
                }
+
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the MessageEOFException 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 MessageEOFException(SerializationInfo info, 
StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
        }
 }

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageFormatException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageFormatException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageFormatException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageFormatException.cs
 Tue Feb  9 19:58:20 2010
@@ -18,9 +18,11 @@
 */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
+       [Serializable]
        public class MessageFormatException : NMSException
        {
                public MessageFormatException()
@@ -47,5 +49,21 @@
                        : base(message, errorCode, innerException)
                {
                }
+
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the MessageFormatException 
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 MessageFormatException(SerializationInfo info, 
StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
        }
 }

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotReadableException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotReadableException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotReadableException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotReadableException.cs
 Tue Feb  9 19:58:20 2010
@@ -18,9 +18,11 @@
 */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
+       [Serializable]
        public class MessageNotReadableException : NMSException
        {
                public MessageNotReadableException()
@@ -47,5 +49,21 @@
                        : base(message, errorCode, innerException)
                {
                }
+
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the 
MessageNotReadableException 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 MessageNotReadableException(SerializationInfo info, 
StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
        }
 }

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotWriteableException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotWriteableException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotWriteableException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotWriteableException.cs
 Tue Feb  9 19:58:20 2010
@@ -18,9 +18,11 @@
 */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
+       [Serializable]
        public class MessageNotWriteableException : NMSException
        {
                public MessageNotWriteableException()
@@ -47,5 +49,21 @@
                        : base(message, errorCode, innerException)
                {
                }
+
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the 
MessageNotWriteableException 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 MessageNotWriteableException(SerializationInfo info, 
StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
        }
 }

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionException.cs
 Tue Feb  9 19:58:20 2010
@@ -14,13 +14,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
        /// <summary>
        /// Represents a connection failure.
        /// </summary>
+       [Serializable]
        public class NMSConnectionException : NMSException
        {
                public NMSConnectionException()
@@ -47,7 +50,21 @@
                        : base(message, errorCode, innerException)
                {
                }
-       }
-}
 
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the NMSConnectionException 
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 NMSConnectionException(SerializationInfo info, 
StreamingContext context)
+                       : base(info, context)
+               {
+               }
 
+               #endregion
+       }
+}

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs 
(original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs 
Tue Feb  9 19:58:20 2010
@@ -16,13 +16,15 @@
  */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
        /// <summary>
-       /// Represents a NMS exception
+       /// Represents an NMS exception
        /// </summary>
-       public class NMSException : System.Exception
+       [Serializable]
+       public class NMSException : Exception
        {
                protected string exceptionErrorCode;
 
@@ -53,6 +55,37 @@
                        exceptionErrorCode = errorCode;
                }
 
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the NMSException 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 NMSException(SerializationInfo info, StreamingContext 
context)
+                       : base(info, context)
+               {
+                       exceptionErrorCode = 
info.GetString("NMSException.exceptionErrorCode");
+               }
+
+               /// <summary>
+               /// When overridden in a derived class, sets the 
SerializationInfo
+               /// with information about the exception.
+               /// </summary>
+               /// <param name="info">The 
System.Runtime.Serialization.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(SerializationInfo info, 
StreamingContext context)
+               {
+                       base.GetObjectData(info, context);
+                       info.AddValue("NMSException.exceptionErrorCode", 
exceptionErrorCode);
+               }
+
+               #endregion
+
                /// <summary>
                /// Returns the error code for the exception, if one has been 
provided.
                /// </summary>

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs
 Tue Feb  9 19:58:20 2010
@@ -16,12 +16,14 @@
  */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
        /// <summary>
        /// Represents a security failure.
        /// </summary>
+       [Serializable]
        public class NMSSecurityException : NMSException
        {
                public NMSSecurityException()
@@ -48,7 +50,21 @@
                        : base(message, errorCode, innerException)
                {
                }
-       }
-}
 
+               #region ISerializable interface implementation
 
+               /// <summary>
+               /// Initializes a new instance of the NMSSecurityException 
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 NMSSecurityException(SerializationInfo info, 
StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
+       }
+}

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ResourceAllocationException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ResourceAllocationException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ResourceAllocationException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ResourceAllocationException.cs
 Tue Feb  9 19:58:20 2010
@@ -18,9 +18,11 @@
 */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
+       [Serializable]
        public class ResourceAllocationException : NMSException
        {
                public ResourceAllocationException()
@@ -47,5 +49,21 @@
                        : base(message, errorCode, innerException)
                {
                }
+
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the 
ResourceAllocationException 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 ResourceAllocationException(SerializationInfo info, 
StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
        }
 }

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionInProgressException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionInProgressException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionInProgressException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionInProgressException.cs
 Tue Feb  9 19:58:20 2010
@@ -18,9 +18,11 @@
 */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
+       [Serializable]
        public class TransactionInProgressException : NMSException
        {
                public TransactionInProgressException()
@@ -47,5 +49,21 @@
                        : base(message, errorCode, innerException)
                {
                }
+
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the 
TransactionInProgressException 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 TransactionInProgressException(SerializationInfo 
info, StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
        }
 }

Modified: 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionRolledBackException.cs
URL: 
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionRolledBackException.cs?rev=908186&r1=908185&r2=908186&view=diff
==============================================================================
--- 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionRolledBackException.cs
 (original)
+++ 
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionRolledBackException.cs
 Tue Feb  9 19:58:20 2010
@@ -18,9 +18,11 @@
 */
 
 using System;
+using System.Runtime.Serialization;
 
 namespace Apache.NMS
 {
+       [Serializable]
        public class TransactionRolledBackException : NMSException
        {
                public TransactionRolledBackException()
@@ -47,5 +49,21 @@
                        : base(message, errorCode, innerException)
                {
                }
+
+               #region ISerializable interface implementation
+
+               /// <summary>
+               /// Initializes a new instance of the 
TransactionRolledBackException 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 TransactionRolledBackException(SerializationInfo 
info, StreamingContext context)
+                       : base(info, context)
+               {
+               }
+
+               #endregion
        }
 }


Reply via email to