activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r911524 - in /activemq/branches/activemq-5.3/activemq-core/src: main/java/org/apache/activemq/ main/java/org/apache/activemq/broker/ test/java/org/apache/activemq/transport/failover/
Date Thu, 18 Feb 2010 18:48:11 GMT
Author: gtully
Date: Thu Feb 18 18:48:11 2010
New Revision: 911524

URL: http://svn.apache.org/viewvc?rev=911524&view=rev
Log:
tidy up merge conflicts with r908453 and include merge -c 909298 https://svn.apache.org/repos/asf/activemq/trunk
for r910315

Modified:
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java
    activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?rev=911524&r1=911523&r2=911524&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Thu Feb 18 18:48:11 2010
@@ -2239,13 +2239,13 @@
         connectionAudit.rollbackDuplicate(dispatcher, message);
     }
 
-	public IOException getFirstFailureError() {
-		return firstFailureError;
-	}
-	
-	protected void waitForTransportInterruptionProcessing() throws InterruptedException {
+    public IOException getFirstFailureError() {
+        return firstFailureError;
+    }
+
+    protected void waitForTransportInterruptionProcessing() throws InterruptedException {
         if (transportInterruptionProcessingComplete != null) {
-            while (!closed.get() && !transportFailed.get() && !transportInterruptionProcessingComplete.await(10,
TimeUnit.SECONDS)) {
+            while (!closed.get() && !transportFailed.get() && !transportInterruptionProcessingComplete.await(15,
TimeUnit.SECONDS)) {
                 LOG.warn("dispatch paused, waiting for outstanding dispatch interruption
processing (" + transportInterruptionProcessingComplete.getCount() + ") to complete..");
             }
             synchronized (this) {
@@ -2253,28 +2253,10 @@
             }
         }
     }
-	
-	protected synchronized void transportInterruptionProcessingComplete() {
-	    if (transportInterruptionProcessingComplete != null) {
-	        transportInterruptionProcessingComplete.countDown();
-	    }
-	}
 
-    private void signalInterruptionProcessingComplete() throws InterruptedException {
-        if (transportInterruptionProcessingComplete.await(0, TimeUnit.SECONDS)) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("transportInterruptionProcessingComplete for: " + this.getConnectionInfo().getConnectionId());
-            }
-            synchronized (this) {
-                transportInterruptionProcessingComplete = null;
-                FailoverTransport failoverTransport = transport.narrow(FailoverTransport.class);
-                if (failoverTransport != null) {
-                    failoverTransport.connectionInterruptProcessingComplete(this.getConnectionInfo().getConnectionId());
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("notified failover transport (" + failoverTransport +")
of interruption completion for: " + this.getConnectionInfo().getConnectionId());
-                    }
-                } 
-            }
+    protected synchronized void transportInterruptionProcessingComplete() {
+        if (transportInterruptionProcessingComplete != null) {
+           transportInterruptionProcessingComplete.countDown();
         }
     }
 

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java?rev=911524&r1=911523&r2=911524&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java
Thu Feb 18 18:48:11 2010
@@ -16,10 +16,10 @@
  */
 package org.apache.activemq.broker;
 
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -97,4 +97,8 @@
     public Object getRegistryMutext() {
         return mutex;
     }
+    
+    public Map<String, BrokerService> getBrokers() {
+        return Collections.unmodifiableMap(this.brokers);
+    }
 }

Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java?rev=911524&r1=911523&r2=911524&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
Thu Feb 18 18:48:11 2010
@@ -262,6 +262,9 @@
         assertEquals("get message 0 second", MESSAGE_TEXT + "0", receivedMessages.get(1).getText());
         assertTrue("another message was received", messagesReceived.await(20, TimeUnit.SECONDS));
         assertEquals("get message 1 eventually", MESSAGE_TEXT + "1", receivedMessages.get(2).getText());
+
+        connection.close();
+    }
         
     @Test
     public void testRollbackFailoverConsumerTx() throws Exception {



Mime
View raw message