geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r1026410 - /geronimo/server/branches/2.2/plugins/activemq/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java
Date Fri, 22 Oct 2010 17:15:37 GMT
Author: kevan
Date: Fri Oct 22 17:15:36 2010
New Revision: 1026410

URL: http://svn.apache.org/viewvc?rev=1026410&view=rev
Log:
GERONIMO-5660 avoid potential ActiveMQ hang during shutdown when asyncStartup is used

Modified:
    geronimo/server/branches/2.2/plugins/activemq/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java

Modified: geronimo/server/branches/2.2/plugins/activemq/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/activemq/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java?rev=1026410&r1=1026409&r2=1026410&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/activemq/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java
(original)
+++ geronimo/server/branches/2.2/plugins/activemq/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java
Fri Oct 22 17:15:36 2010
@@ -140,6 +140,10 @@ public class BrokerServiceGBeanImpl impl
     public synchronized void doStop() throws Exception {
         if (asyncStartup) {
             active.set(false);
+            // ActiveMQ AMQPersistenceAdapter can hang, if we are still starting
+            if (asyncStarted.getCount() > 0) {
+                return;
+            }
         }
         brokerService.stop();
         brokerService.waitUntilStopped();
@@ -148,6 +152,10 @@ public class BrokerServiceGBeanImpl impl
     public synchronized void doFail() {
         if (asyncStartup) {
             active.set(false);
+            // ActiveMQ AMQPersistenceAdapter can hang, if we are still starting
+            if (asyncStarted.getCount() > 0) {
+                return;
+            }
         }        
         try {
             brokerService.stop();



Mime
View raw message