Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-06-11 06:16:51 +0000
committerEike Stepper2013-06-11 06:16:51 +0000
commit6ed03c2aafe6c4d47aeaa86c269ddbd2601012c7 (patch)
tree208ed694210bd905be5e0c1d462498385852ce46
parent496026a599f54552b2a37465787a5e7094320fb4 (diff)
downloadcdo-6ed03c2aafe6c4d47aeaa86c269ddbd2601012c7.tar.gz
cdo-6ed03c2aafe6c4d47aeaa86c269ddbd2601012c7.tar.xz
cdo-6ed03c2aafe6c4d47aeaa86c269ddbd2601012c7.zip
[410409] CDOClientIndications can arrive before session is fully active
https://bugs.eclipse.org/bugs/show_bug.cgi?id=410409
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientIndication.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientIndication.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientIndication.java
index e7a5a55622..15d382dc87 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientIndication.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientIndication.java
@@ -24,6 +24,8 @@ import org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl;
import org.eclipse.net4j.signal.Indication;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.StringIO;
+import org.eclipse.net4j.util.lifecycle.LifecycleState;
+import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.emf.spi.cdo.InternalCDOSession;
@@ -53,6 +55,14 @@ public abstract class CDOClientIndication extends Indication
@Override
protected final void indicating(ExtendedDataInputStream in) throws Exception
{
+ final InternalCDOSession session = getSession();
+ if (session.getLifecycleState() == LifecycleState.DEACTIVATING)
+ {
+ LifecycleUtil.waitForActive(session, 10000L);
+ }
+
+ LifecycleUtil.checkActive(session);
+
indicating(new CDODataInputImpl(in)
{
@Override
@@ -69,31 +79,31 @@ public abstract class CDOClientIndication extends Indication
public CDOPackageRegistry getPackageRegistry()
{
- return getSession().getPackageRegistry();
+ return session.getPackageRegistry();
}
@Override
protected CDOBranchManager getBranchManager()
{
- return getSession().getBranchManager();
+ return session.getBranchManager();
}
@Override
protected CDOCommitInfoManager getCommitInfoManager()
{
- return getSession().getCommitInfoManager();
+ return session.getCommitInfoManager();
}
@Override
protected CDORevisionFactory getRevisionFactory()
{
- return getSession().getRevisionManager().getFactory();
+ return session.getRevisionManager().getFactory();
}
@Override
protected CDOLobStore getLobStore()
{
- return getSession().getLobStore();
+ return session.getLobStore();
}
});
}

Back to the top