Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-09-15 09:50:12 +0000
committerEike Stepper2010-09-15 09:50:12 +0000
commit37cf5bedfd931a4b30d4214a92486235f4397802 (patch)
tree6b4ec45ed0d6dc7f388ebdfd10b9bf98dcff706b
parent365cb3483fdf00738cc4d07afc2d79ce69dad7a7 (diff)
downloadcdo-37cf5bedfd931a4b30d4214a92486235f4397802.tar.gz
cdo-37cf5bedfd931a4b30d4214a92486235f4397802.tar.xz
cdo-37cf5bedfd931a4b30d4214a92486235f4397802.zip
[325322] CommitTransactionIndication: postCommit(false) not called after error in indicating()
https://bugs.eclipse.org/bugs/show_bug.cgi?id=325322
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java84
1 files changed, 53 insertions, 31 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
index e2f8a0b436..b0d3c8325a 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
@@ -117,44 +117,66 @@ public class CommitTransactionIndication extends IndicationWithMonitoring
@Override
protected final void indicating(ExtendedDataInputStream in, OMMonitor monitor) throws Exception
{
- indicating(new CDODataInputImpl(in)
+ try
{
- @Override
- protected CDOPackageRegistry getPackageRegistry()
+ indicating(new CDODataInputImpl(in)
{
- return commitContext.getPackageRegistry();
- }
+ @Override
+ protected CDOPackageRegistry getPackageRegistry()
+ {
+ return commitContext.getPackageRegistry();
+ }
- @Override
- protected StringIO getPackageURICompressor()
- {
- return getProtocol().getPackageURICompressor();
- }
+ @Override
+ protected StringIO getPackageURICompressor()
+ {
+ return getProtocol().getPackageURICompressor();
+ }
- @Override
- protected CDOBranchManager getBranchManager()
- {
- return CommitTransactionIndication.this.getRepository().getBranchManager();
- }
+ @Override
+ protected CDOBranchManager getBranchManager()
+ {
+ return CommitTransactionIndication.this.getRepository().getBranchManager();
+ }
- @Override
- protected CDOCommitInfoManager getCommitInfoManager()
- {
- return CommitTransactionIndication.this.getRepository().getCommitInfoManager();
- }
+ @Override
+ protected CDOCommitInfoManager getCommitInfoManager()
+ {
+ return CommitTransactionIndication.this.getRepository().getCommitInfoManager();
+ }
- @Override
- protected CDORevisionFactory getRevisionFactory()
- {
- return CommitTransactionIndication.this.getRepository().getRevisionManager().getFactory();
- }
+ @Override
+ protected CDORevisionFactory getRevisionFactory()
+ {
+ return CommitTransactionIndication.this.getRepository().getRevisionManager().getFactory();
+ }
- @Override
- protected CDOListFactory getListFactory()
- {
- return CDOListImpl.FACTORY;
- }
- }, monitor);
+ @Override
+ protected CDOListFactory getListFactory()
+ {
+ return CDOListImpl.FACTORY;
+ }
+ }, monitor);
+ }
+ catch (Exception ex)
+ {
+ indicatingFailed();
+ throw ex;
+ }
+ catch (Error ex)
+ {
+ indicatingFailed();
+ throw ex;
+ }
+ }
+
+ private void indicatingFailed()
+ {
+ if (commitContext != null)
+ {
+ commitContext.postCommit(false);
+ commitContext = null;
+ }
}
protected void indicating(CDODataInput in, OMMonitor monitor) throws Exception

Back to the top