[jboss-svn-commits] JBL Code SVN: r28043 - labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jul 15 06:40:45 EDT 2009


Author: adinn
Date: 2009-07-15 06:40:45 -0400 (Wed, 15 Jul 2009)
New Revision: 28043

Modified:
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java
Log:
corrected periodic recovery synchronous shutdown so that it does not return until the periodic recovery thread is guaranteed to have exited rather than just cleaned up - fix for JBTM-576

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java	2009-07-15 10:30:02 UTC (rev 28042)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java	2009-07-15 10:40:45 UTC (rev 28043)
@@ -235,6 +235,15 @@
                }
            }
        }
+
+       // if the shutdown is synchronous then make sure the periodic recovery thread really has stopped running
+       if (!async && this.isAlive()) {
+           try {
+               this.join();
+           } catch (InterruptedException e) {
+               // ignore
+           }
+       }
    }
 
     /**




More information about the jboss-svn-commits mailing list