aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ross2011-11-07 19:17:54 (EST)
committerJohn Ross2011-11-07 19:17:54 (EST)
commit42a48979538c0fb268cd569ed24d9736db201fc1 (patch)
tree23cdf8d6cb068f0435242191f6d1853c135f80ce
parent700a442d15ad226b6c762a6adc35507dab45ffcd (diff)
downloadrt.equinox.bundles-42a48979538c0fb268cd569ed24d9736db201fc1.zip
rt.equinox.bundles-42a48979538c0fb268cd569ed24d9736db201fc1.tar.gz
rt.equinox.bundles-42a48979538c0fb268cd569ed24d9736db201fc1.tar.bz2
Bug 362232 - [coordinator] Add support for the new, mandatory orphaned coordination requirement.
Updated processOrphanedCoordinations to catch and log any errors produced by ending the coordination except when the failure cause is ORPHANED.
-rw-r--r--bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationWeakReference.java8
-rw-r--r--bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/messages.properties4
2 files changed, 9 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationWeakReference.java b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationWeakReference.java
index 0442c38..27dcbc0 100644
--- a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationWeakReference.java
+++ b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationWeakReference.java
@@ -47,7 +47,13 @@ public class CoordinationWeakReference extends WeakReference<CoordinationReferen
c.end();
}
catch (CoordinationException e) {
- // This is expected since we already failed the coordination.
+ // This is expected since we already failed the coordination...
+ if (!Coordination.ORPHANED.equals(e.getCause()))
+ // ...but only if the cause is ORPHANED.
+ c.getLogService().log(LogService.LOG_ERROR, NLS.bind(Messages.CoordinatorImpl_5, c.getName(), c.getId()), e);
+ }
+ catch (Throwable t) {
+ c.getLogService().log(LogService.LOG_ERROR, NLS.bind(Messages.CoordinatorImpl_5, c.getName(), c.getId()), t);
}
}
}
diff --git a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/messages.properties b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/messages.properties
index d3ca681..fc33abc 100644
--- a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/messages.properties
+++ b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/messages.properties
@@ -25,8 +25,8 @@ CoordinationImpl_7=Coordination has failed
CoordinationImpl_8=Coordination has already ended
CoordinationImpl_9=An unexpected exception occurred while failing a coordination. This will not stop the timer thread.
CoordinatorImpl_0=The next Coordinator ID would exceed the maximum possible value
-CoordinatorImpl_1=A requestor did not have permission to view a coordination
+CoordinatorImpl_1=A requester did not have permission to view a coordination
CoordinatorImpl_2=This coordinator has been shutdown
CoordinatorImpl_3=Coordination already exists
CoordinatorImpl_4=Unable to purge the canceled task
-CoordinatorImpl_5=An error occurred while failing coordination {0} with ID {1}.
+CoordinatorImpl_5=An error occurred while processing orphaned coordination {0} with ID {1}.