[jboss-cvs] JBoss Messaging SVN: r8496 - in branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884: src/main/org/jboss/jms/tx and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jan 25 06:21:49 EST 2012
Author: raggz
Date: 2012-01-25 06:21:49 -0500 (Wed, 25 Jan 2012)
New Revision: 8496
Modified:
branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/
branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/tx/ClientTransaction.java
branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/tx/TransactionRequest.java
branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java
Log:
Back port JBMessaging-1884
Property changes on: branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/Branch_1_4:8138,8141-8142
+ /branches/Branch_1_4:8138,8141-8142,8380
Modified: branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/tx/ClientTransaction.java
===================================================================
--- branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/tx/ClientTransaction.java 2012-01-25 11:20:28 UTC (rev 8495)
+++ branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/tx/ClientTransaction.java 2012-01-25 11:21:49 UTC (rev 8496)
@@ -66,6 +66,9 @@
private boolean recovered;
+ /* Not sent over the wire, this is for differentiating between incompatible versions */
+ protected boolean supportsRecovered ;
+
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
@@ -233,7 +236,16 @@
recovered = b;
}
+ public void setSupportsRecovered(final boolean supportsRecovered)
+ {
+ this.supportsRecovered = supportsRecovered ;
+ }
+ public boolean getSupportsRecovered()
+ {
+ return supportsRecovered ;
+ }
+
// Streamable implementation ---------------------------------
public void write(DataOutputStream out) throws Exception
@@ -291,7 +303,10 @@
out.writeLong(Long.MIN_VALUE);
}
}
- out.writeBoolean(recovered);
+ if (supportsRecovered)
+ {
+ out.writeBoolean(recovered);
+ }
}
@@ -336,7 +351,10 @@
}
}
- recovered = in.readBoolean();
+ if (supportsRecovered)
+ {
+ recovered = in.readBoolean();
+ }
}
// Protected -----------------------------------------------------
Modified: branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/tx/TransactionRequest.java
===================================================================
--- branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/tx/TransactionRequest.java 2012-01-25 11:20:28 UTC (rev 8495)
+++ branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/tx/TransactionRequest.java 2012-01-25 11:21:49 UTC (rev 8496)
@@ -67,6 +67,9 @@
protected ClientTransaction state;
+ /* Not send over the wire, this is for differentiating between incompatible versions of ClientTransaction */
+ protected boolean supportsRecovered ;
+
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
@@ -110,6 +113,7 @@
if (state != null)
{
out.write(PRESENT);
+ state.setSupportsRecovered(supportsRecovered) ;
state.write(out);
}
else
@@ -153,6 +157,7 @@
else
{
state = new ClientTransaction();
+ state.setSupportsRecovered(supportsRecovered) ;
state.read(in);
}
@@ -175,6 +180,16 @@
return requestType;
}
+ public void setSupportsRecovered(final boolean supportsRecovered)
+ {
+ this.supportsRecovered = supportsRecovered ;
+ }
+
+ public boolean getSupportsRecovered()
+ {
+ return supportsRecovered ;
+ }
+
public String toString()
{
return "TransactionRequest[" +
Modified: branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java
===================================================================
--- branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java 2012-01-25 11:20:28 UTC (rev 8495)
+++ branches/JBossMessaging_1_4_7_GA_JBMESSAGING-1831_JBMESSAGING-1884/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java 2012-01-25 11:21:49 UTC (rev 8496)
@@ -24,6 +24,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
+import org.jboss.jms.client.ConnectionCapabilities;
import org.jboss.jms.delegate.ConnectionEndpoint;
import org.jboss.jms.tx.TransactionRequest;
@@ -63,6 +64,9 @@
super.read(is);
req = new TransactionRequest();
+
+ final boolean supportsRecovered = ConnectionCapabilities.doesConnectionSupportRecoveryRollback(version) ;
+ req.setSupportsRecovered(supportsRecovered) ;
req.read(is);
@@ -88,6 +92,9 @@
{
super.write(os);
+ final boolean supportsRecovered = ConnectionCapabilities.doesConnectionSupportRecoveryRollback(version) ;
+ req.setSupportsRecovered(supportsRecovered) ;
+
req.write(os);
os.writeBoolean(checkForDuplicates);
More information about the jboss-cvs-commits
mailing list