Author: orudyy
Date: Tue Jan 20 18:03:19 2015
New Revision: 1653320

URL: http://svn.apache.org/r1653320
Log:
QPID-6259: Fix stopping of BDB committer from committer thread

Modified:
    
qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/CoalescingCommiter.java

Modified: 
qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/CoalescingCommiter.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/CoalescingCommiter.java?rev=1653320&r1=1653319&r2=1653320&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/CoalescingCommiter.java
 (original)
+++ 
qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/CoalescingCommiter.java
 Tue Jan 20 18:03:19 2015
@@ -50,14 +50,17 @@ public class CoalescingCommiter implemen
     public void stop()
     {
         _commitThread.close();
-        try
+        if (Thread.currentThread() != _commitThread)
         {
-            _commitThread.join();
-        }
-        catch (InterruptedException ie)
-        {
-            Thread.currentThread().interrupt();
-            throw new RuntimeException("Commit thread has not shutdown", ie);
+            try
+            {
+                _commitThread.join();
+            }
+            catch (InterruptedException ie)
+            {
+                Thread.currentThread().interrupt();
+                throw new RuntimeException("Commit thread has not shutdown", 
ie);
+            }
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to