activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r811003 - in /activemq/trunk: activemq-core/src/main/java/org/apache/activemq/ activemq-ra/src/test/java/org/apache/activemq/ra/
Date Thu, 03 Sep 2009 15:54:53 GMT
Author: gtully
Date: Thu Sep  3 15:54:53 2009
New Revision: 811003

URL: http://svn.apache.org/viewvc?rev=811003&view=rev
Log:
resolve https://issues.apache.org/activemq/browse/AMQ-2346 - TransactionContext XA state needs
to be static to be shared across XAResource views

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
    activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?rev=811003&r1=811002&r2=811003&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Thu Sep  3 15:54:53 2009
@@ -1435,7 +1435,7 @@
 
         if (isConnectionInfoSentToBroker) {
             if (!transportFailed.get() && !closing.get()) {
-                asyncSendPacket(info.createRemoveCommand());
+                syncSendPacket(info.createRemoveCommand());
             }
             isConnectionInfoSentToBroker = false;
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java?rev=811003&r1=811002&r2=811003&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
Thu Sep  3 15:54:53 2009
@@ -64,7 +64,7 @@
     private static final Log LOG = LogFactory.getLog(TransactionContext.class);
 
     // XATransactionId -> ArrayList of TransactionContext objects
-    private final ConcurrentHashMap<TransactionId, List<TransactionContext>>
ENDED_XA_TRANSACTION_CONTEXTS = new ConcurrentHashMap<TransactionId, List<TransactionContext>>();
+    private final static ConcurrentHashMap<TransactionId, List<TransactionContext>>
ENDED_XA_TRANSACTION_CONTEXTS = new ConcurrentHashMap<TransactionId, List<TransactionContext>>();
 
     private final ActiveMQConnection connection;
     private final LongSequenceGenerator localTransactionIdGenerator;

Modified: activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java?rev=811003&r1=811002&r2=811003&view=diff
==============================================================================
--- activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java
(original)
+++ activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java
Thu Sep  3 15:54:53 2009
@@ -63,8 +63,14 @@
         return (ConnectionFactory) managedConnectionFactory.createConnectionFactory(connectionManager);
     }
 
-    public void xtestRepeatReceiveTwoThenRollback() throws Exception {
+    public void testReconnectWithClientId() throws Exception {
         for (index = 0; index< 20; index ++) {
+            reconnect();
+        }
+    }
+
+    public void testRepeatReceiveTwoThenRollback() throws Exception {
+        for (index = 0; index< 2; index ++) {
             testReceiveTwoThenRollback();
         }
     }



Mime
View raw message