activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r663691 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Date Thu, 05 Jun 2008 18:11:46 GMT
Author: rajdavies
Date: Thu Jun  5 11:11:46 2008
New Revision: 663691

URL: http://svn.apache.org/viewvc?rev=663691&view=rev
Log:
Further change for https://issues.apache.org/activemq/browse/AMQ-1771

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java?rev=663691&r1=663690&r2=663691&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Thu Jun  5 11:11:46 2008
@@ -694,7 +694,7 @@
                                     try {
                                         //if it isn't set after 2secs - it
                                         //probably never will be
-                                    listenerMutex.wait(2000);
+                                        listenerMutex.wait(2000);
                                     }catch(InterruptedException ex) {}
                                 }
                             }
@@ -725,11 +725,12 @@
  	
                 // Make sure on initial startup, that the transportListener has been initialized
                 // for this instance.
-                while(transportListener == null) {
-                    try {
-                        Thread.sleep(100);
+                synchronized(listenerMutex) {
+                    if (transportListener==null) {
+                        try {
+                            listenerMutex.wait(2000);
+                        }catch(InterruptedException ex) {}
                     }
-                    catch(InterruptedException iEx) {}
                 }
 
           



Mime
View raw message