Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2009-12-26 02:04:56 -0500
committerEike Stepper2009-12-26 02:04:56 -0500
commitc025366ffe8da7757a6c69e9bffb57e1dbba64a3 (patch)
treefa79d650e3563cf3e0d7e75baa94a88883a43212 /plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction
parent957160ed7bd485d72e76e65934080c90c7eba2d9 (diff)
downloadcdo-c025366ffe8da7757a6c69e9bffb57e1dbba64a3.tar.gz
cdo-c025366ffe8da7757a6c69e9bffb57e1dbba64a3.tar.xz
cdo-c025366ffe8da7757a6c69e9bffb57e1dbba64a3.zip
[290251] CDOXATransaction commit does not end.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290251
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction')
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java24
1 files changed, 18 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java
index 73e4d4b6c4..35d55514eb 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java
@@ -27,6 +27,7 @@ import org.eclipse.net4j.util.WrappedException;
import org.eclipse.net4j.util.om.monitor.EclipseMonitor;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.monitor.EclipseMonitor.SynchonizedSubProgressMonitor;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.transaction.TransactionException;
import org.eclipse.emf.common.notify.Adapter;
@@ -91,6 +92,8 @@ import java.util.concurrent.TimeoutException;
*/
public class CDOXATransactionImpl implements InternalCDOXATransaction
{
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_TRANSACTION, CDOXATransactionImpl.class);
+
private List<InternalCDOTransaction> transactions = new ArrayList<InternalCDOTransaction>();
private boolean allRequestEnabled = true;
@@ -194,7 +197,8 @@ public class CDOXATransactionImpl implements InternalCDOXATransaction
private void send(Collection<InternalCDOXACommitContext> xaContexts, final IProgressMonitor progressMonitor)
throws InterruptedException, ExecutionException
{
- progressMonitor.beginTask("", xaContexts.size()); //$NON-NLS-1$
+ int xaContextSize = xaContexts.size();
+ progressMonitor.beginTask("", xaContextSize); //$NON-NLS-1$
try
{
@@ -205,23 +209,31 @@ public class CDOXATransactionImpl implements InternalCDOXATransaction
futures.add(executorService.submit(xaContext));
}
- int nbProcessDone;
+ int nbProcessDone = 0;
+
do
{
- nbProcessDone = 0;
for (Future<Object> future : futures)
{
try
{
- future.get(1, TimeUnit.MILLISECONDS);
+ future.get(2000, TimeUnit.MILLISECONDS);
nbProcessDone++;
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Got {0}", future);
+ }
}
catch (TimeoutException ex)
{
- OM.LOG.warn(ex);
+ // Just retry
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Waiting for {0}", future);
+ }
}
}
- } while (xaContexts.size() != nbProcessDone);
+ } while (xaContextSize != nbProcessDone);
}
finally
{

Back to the top