activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1469615 - in /activemq/activemq-dotnet: Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageDispatchGenerator.java Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/MessageDispatch.cs
Date Thu, 18 Apr 2013 22:42:17 GMT
Author: tabish
Date: Thu Apr 18 22:42:17 2013
New Revision: 1469615

URL: http://svn.apache.org/r1469615
Log:
Add a transient Exception field in MessageDispatch to store the Rollback cause.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageDispatchGenerator.java
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/MessageDispatch.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageDispatchGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageDispatchGenerator.java?rev=1469615&r1=1469614&r2=1469615&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageDispatchGenerator.java
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageDispatchGenerator.java
Thu Apr 18 22:42:17 2013
@@ -16,6 +16,8 @@
  */
 package org.apache.activemq.nms.openwire.tool.commands;
 
+import java.io.PrintWriter;
+
 public class MessageDispatchGenerator extends CommandClassGenerator {
 
     public MessageDispatchGenerator() {
@@ -23,4 +25,29 @@ public class MessageDispatchGenerator ex
         this.setComparable(true);
     }
 
+    protected void generateUsingDirectives( PrintWriter out ) {
+        super.generateUsingDirectives(out);
+
+        out.println("using System;");
+    }
+
+    protected void generateProperties( PrintWriter out ) {
+
+        out.println("        private Exception rollbackCause = null;");
+        out.println("");
+
+        super.generateProperties(out);
+    }
+
+    protected void generateAdditonalMembers( PrintWriter out ) {
+        out.println("        public Exception RollbackCause");
+        out.println("        {");
+        out.println("            get { return this.rollbackCause; }");
+        out.println("            set { this.rollbackCause = value; }");
+        out.println("        }");
+        out.println("");
+
+        super.generateAdditonalMembers( out );
+    }
+
 }

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/MessageDispatch.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/MessageDispatch.cs?rev=1469615&r1=1469614&r2=1469615&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/MessageDispatch.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/MessageDispatch.cs
Thu Apr 18 22:42:17 2013
@@ -17,6 +17,7 @@
 
 
 using Apache.NMS.ActiveMQ.State;
+using System;
 
 namespace Apache.NMS.ActiveMQ.Commands
 {
@@ -33,6 +34,8 @@ namespace Apache.NMS.ActiveMQ.Commands
     {
         public const byte ID_MESSAGEDISPATCH = 21;
 
+        private Exception rollbackCause = null;
+
         ConsumerId consumerId;
         ActiveMQDestination destination;
         Message message;
@@ -66,6 +69,12 @@ namespace Apache.NMS.ActiveMQ.Commands
                 "RedeliveryCounter = " + RedeliveryCounter + " ]";
         }
 
+        public Exception RollbackCause
+        {
+            get { return this.rollbackCause; }
+            set { this.rollbackCause = value; }
+        }
+
         public ConsumerId ConsumerId
         {
             get { return consumerId; }



Mime
View raw message