activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1102007 [6/6] - in /activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire: codec/v7/ command/ support/
Date Wed, 11 May 2011 18:19:07 GMT
Modified: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/MessageDispatch.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/MessageDispatch.java?rev=1102007&r1=1102006&r2=1102007&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/MessageDispatch.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/MessageDispatch.java
Wed May 11 18:19:05 2011
@@ -34,6 +34,7 @@ public class MessageDispatch extends Bas
     protected transient long deliverySequenceId;
     protected transient Object consumer;
     protected transient Runnable transmitCallback;
+    protected transient Throwable rollbackCause;
 
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
@@ -115,4 +116,11 @@ public class MessageDispatch extends Bas
         this.transmitCallback = transmitCallback;
     }
 
+    public Throwable getRollbackCause() {
+        return rollbackCause;
+    }
+
+    public void setRollbackCause(Throwable rollbackCause) {
+        this.rollbackCause = rollbackCause;
+    }
 }

Modified: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/XATransactionId.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/XATransactionId.java?rev=1102007&r1=1102006&r2=1102007&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/XATransactionId.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/XATransactionId.java
Wed May 11 18:19:05 2011
@@ -22,6 +22,7 @@ import org.fusesource.hawtbuf.HexSupport
 
 import javax.transaction.xa.Xid;
 import java.util.Arrays;
+import java.util.ArrayList;
 
 /**
  * @openwire:marshaller code="112"
@@ -37,6 +38,7 @@ public class XATransactionId extends Tra
 
     private transient int hash;
     private transient String transactionKey;
+    private transient ArrayList<MessageAck> preparedAcks;
 
     public XATransactionId() {
     }
@@ -53,8 +55,17 @@ public class XATransactionId extends Tra
 
     public synchronized String getTransactionKey() {
         if (transactionKey == null) {
-            transactionKey = "XID:" + formatId + ":" + HexSupport.toHexFromBuffer(new Buffer(globalTransactionId))
+ ":"
-                             + HexSupport.toHexFromBuffer(new Buffer(branchQualifier));
+            StringBuffer s = new StringBuffer();
+            s.append("XID:[globalId=");
+            for (int i = 0; i < globalTransactionId.length; i++) {
+                s.append(Integer.toHexString(globalTransactionId[i]));
+            }
+            s.append(",branchId=");
+            for (int i = 0; i < branchQualifier.length; i++) {
+                s.append(Integer.toHexString(branchQualifier[i]));
+            }
+            s.append("]");
+            transactionKey = s.toString();
         }
         return transactionKey;
     }
@@ -144,4 +155,11 @@ public class XATransactionId extends Tra
         return getTransactionKey().compareTo(xid.getTransactionKey());
     }
 
+    public void setPreparedAcks(ArrayList<MessageAck> preparedAcks) {
+        this.preparedAcks = preparedAcks;
+    }
+
+    public ArrayList<MessageAck> getPreparedAcks() {
+        return preparedAcks;
+    }
 }

Modified: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/support/MarshallingSupport.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/support/MarshallingSupport.java?rev=1102007&r1=1102006&r2=1102007&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/support/MarshallingSupport.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/support/MarshallingSupport.java
Wed May 11 18:19:05 2011
@@ -402,4 +402,10 @@ public final class MarshallingSupport {
         return result;
     }
 
+    public static String truncate64(String text) {
+        if (text.length() > 63) {
+            text = text.substring(0, 45) + "..." + text.substring(text.length() - 12);
+        }
+        return text;
+    }
 }



Mime
View raw message