[jboss-svn-commits] JBL Code SVN: r13950 - in labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats: internal/arjuna/coordinator and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Aug 2 03:33:27 EDT 2007
Author: adinn
Date: 2007-08-02 03:33:27 -0400 (Thu, 02 Aug 2007)
New Revision: 13950
Modified:
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TransactionReaper.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperThread.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperWorkerThread.java
Log:
removed trace printout : fix for JIRA JBTM-273
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TransactionReaper.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TransactionReaper.java 2007-08-02 06:49:39 UTC (rev 13949)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TransactionReaper.java 2007-08-02 07:33:27 UTC (rev 13950)
@@ -230,14 +230,11 @@
{ Long.toString(e._absoluteTimeout) });
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper " + Thread.currentThread() + " : checking " + e._control.get_uid());
-
final long now = System.currentTimeMillis();
if (now < e._absoluteTimeout)
{
// go back to sleep
- if (TransactionReaper.printTestOutput) System.out.println("Reaper " + Thread.currentThread() + " : ms wait " + (e._absoluteTimeout - now));
break;
}
@@ -250,8 +247,6 @@
"Reaper timeout for TX " + e._control.get_uid() + " state " + e.statusName());
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper " + Thread.currentThread() + " : timeout " + e._control.get_uid());
-
// if we have to synchronize on multiple objects we always
// do so in a fixed order ReaperElement before Reaper and
// ReaperElement before Reaper._cancelQueue in order to
@@ -332,8 +327,6 @@
VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ATOMIC_ACTION,
"Reaper deferring interrupt for TX scheduled for cancel " + e._control.get_uid());
}
-
- if (TransactionReaper.printTestOutput) System.out.println("Reaper " + Thread.currentThread() + " : deferring interrupt for TX scheduled for cancel " + e._control.get_uid());
}
break;
case ReaperElement.CANCEL:
@@ -370,7 +363,6 @@
"com.arjuna.ats.internal.arjuna.coordinator.ReaperThread_4",
new Object[]{e._control.get_uid()});
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper " + Thread.currentThread() + " : interrupting cancel in progress for " + e._control.get_uid());
}
break;
case ReaperElement.CANCEL_INTERRUPTED:
@@ -396,7 +388,6 @@
VisibilityLevel.VIS_PUBLIC,
FacilityCode.FAC_ATOMIC_ACTION, "Reaper " + Thread.currentThread() + " got a zombie " + e._worker + " (zombie count now " + _zombieCount + ") cancelling " + e._control.get_uid());
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper " + Thread.currentThread() + " got a zombie " + e._worker + " (zombie count now " + _zombieCount + ") cancealling " + e._control.get_uid());
if (_zombieCount == _zombieMax)
{
@@ -412,8 +403,6 @@
"com.arjuna.ats.internal.arjuna.coordinator.ReaperThread_5",
new Object[]{new Integer(_zombieCount)});
}
-
- if (TransactionReaper.printTestOutput) System.out.println("Reaper " + Thread.currentThread() + " too many zombies (" + _zombieCount + ")! " + e._control.get_uid());
}
}
@@ -436,7 +425,6 @@
e._control.get_uid()});
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper " + Thread.currentThread() + " : thread " + e._worker + " executing cancel did not respond to interrupt -- scheduling for rollback! " + e._control.get_uid());
// ok, since the worker was wedged we need to
// remove the entry from the timeouts and
// transactions lists then mark this tx as
@@ -465,7 +453,6 @@
"com.arjuna.ats.internal.arjuna.coordinator.ReaperThread_10",
new Object[]{e._control.get_uid()});
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper Worker " + Thread.currentThread() + " successfully marked TX " + e._control.get_uid() + " as rollback only");
}
else
{
@@ -480,7 +467,6 @@
"com.arjuna.ats.internal.arjuna.coordinator.ReaperThread_11",
new Object[]{e._control.get_uid()});
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper Worker " + Thread.currentThread() + " failed to mark TX " + e._control.get_uid() + " as rollback only");
}
}
catch(Exception e1)
@@ -496,7 +482,6 @@
"com.arjuna.ats.internal.arjuna.coordinator.ReaperThread_12",
new Object[]{e._control.get_uid()});
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper Worker " + Thread.currentThread() + " exception during mark-as-rollback of TX " + e._control.get_uid());
}
}
break;
@@ -570,7 +555,6 @@
DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
FacilityCode.FAC_ATOMIC_ACTION, "Reaper Worker " + Thread.currentThread() + " attempting to cancel " + e._control.get_uid());
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper Worker " + Thread.currentThread() + " : attempting to cancel " + e._control.get_uid());
boolean cancelled = false;
boolean excepted = false;
@@ -638,8 +622,6 @@
new Integer(_zombieCount)});
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper Worker" + Thread.currentThread() + " failed to respond to interrupt trying to cancel or mark as rollback only TX " + e._control.get_uid() + " -- exiting as zombie (zombie count decremented to " + _zombieCount + ")");
-
// this gets us out of the for(;;) loop and
// the shutdown call above makes sure we exit
// after returning
@@ -684,8 +666,6 @@
e._control.get_uid()});
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper Worker " + Thread.currentThread() + " successfully cancelled TX " + e._control.get_uid());
-
synchronized(this)
{
_timeouts.remove(e._control);
@@ -707,8 +687,6 @@
new Object[]{Thread.currentThread(),
e._control.get_uid()});
}
-
- if (TransactionReaper.printTestOutput) System.out.println("Reaper Worker " + Thread.currentThread() + " exception during cancel of TX " + e._control.get_uid() + " -- rescheduling for mark-as-rollback");
}
else
{
@@ -723,8 +701,6 @@
new Object[]{Thread.currentThread(),
e._control.get_uid()});
}
-
- if (TransactionReaper.printTestOutput) System.out.println("Reaper Worker " + Thread.currentThread() + " failed to cancel TX " + e._control.get_uid() + " rescheduling for mark-as-rollback");
}
synchronized(this)
@@ -749,7 +725,6 @@
new Object[]{Thread.currentThread(),
e._control.get_uid()});
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper Worker " + Thread.currentThread() + " successfully marked TX " + e._control.get_uid() + " as rollback only");
}
else
{
@@ -766,7 +741,6 @@
new Object[]{Thread.currentThread(),
e._control.get_uid()});
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper Worker " + Thread.currentThread() + " failed to mark TX " + e._control.get_uid() + " as rollback only");
}
}
catch(Exception e1)
@@ -783,7 +757,6 @@
new Object[]{Thread.currentThread(),
e._control.get_uid()});
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper Worker " + Thread.currentThread() + " exception during mark-as-rollback of TX " + e._control.get_uid());
}
}
}
@@ -1178,6 +1151,4 @@
private static long _lifetime = 0;
private static int _zombieCount = 0;
-
- public final static boolean printTestOutput = false;
}
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperThread.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperThread.java 2007-08-02 06:49:39 UTC (rev 13949)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperThread.java 2007-08-02 07:33:27 UTC (rev 13950)
@@ -69,8 +69,6 @@
tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
FacilityCode.FAC_ATOMIC_ACTION, "ReaperThread.run ()");
}
-
- if (TransactionReaper.printTestOutput) System.out.println("Reaper " + Thread.currentThread() + " : started");
for (;;)
{
@@ -97,8 +95,6 @@
Long.toString(sleepPeriod)});
}
- if (TransactionReaper.printTestOutput) System.out.println("Reaper " + Thread.currentThread() + " : sleeping " + Long.toString(sleepPeriod));
-
reaperObject.wait(sleepPeriod);
}
catch (InterruptedException e1) {}
@@ -110,8 +106,6 @@
tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
FacilityCode.FAC_ATOMIC_ACTION, "ReaperThread.run ()");
}
-
- if (TransactionReaper.printTestOutput) System.out.println("Reaper " + Thread.currentThread() + " : woke up");
if (_shutdown)
return;
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperWorkerThread.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperWorkerThread.java 2007-08-02 06:49:39 UTC (rev 13949)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperWorkerThread.java 2007-08-02 07:33:27 UTC (rev 13950)
@@ -58,8 +58,6 @@
FacilityCode.FAC_ATOMIC_ACTION, "ReaperWorkerThread.run ()");
}
- if (TransactionReaper.printTestOutput) System.out.println("Worker " + this + " : started");
-
for (;;)
{
// wait for the reaper thread to queue some TXs for
@@ -73,8 +71,6 @@
new Object[]{Thread.currentThread()});
}
- if (TransactionReaper.printTestOutput) System.out.println("Worker " + this + " : waiting");
-
_theReaper.waitForCancellations();
// check for shutdown before we wait again
@@ -92,8 +88,6 @@
new Object[]{Thread.currentThread()});
}
- if (TransactionReaper.printTestOutput) System.out.println("Worker " + this + " : doing cancellations");
-
_theReaper.doCancellations();
// check for shutdown before we wait again
More information about the jboss-svn-commits
mailing list