summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-17 06:36:00 (EDT)
committerEike Stepper2007-07-17 06:36:00 (EDT)
commit10bdf11fb0e0480dd9f74ea2330e1c17d435b8bb (patch)
tree97d434076fe6ae2823d4be2eaa1210e9c8f6de78
parent47dabed44c556e67a420f20034f2db0bafc82dfa (diff)
downloadcdo-10bdf11fb0e0480dd9f74ea2330e1c17d435b8bb.zip
cdo-10bdf11fb0e0480dd9f74ea2330e1c17d435b8bb.tar.gz
cdo-10bdf11fb0e0480dd9f74ea2330e1c17d435b8bb.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RegisterPackagesIndication.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOPackageRegistryImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RegisterPackagesRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/EMFUtil.java27
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java5
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java5
7 files changed, 34 insertions, 17 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java
index 6348489..63a2ec2 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java
@@ -10,8 +10,8 @@
**************************************************************************/
package org.eclipse.emf.cdo.internal.server.protocol;
-import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageManagerImpl;
import org.eclipse.emf.cdo.internal.server.Repository;
+import org.eclipse.emf.cdo.internal.server.RepositoryPackageManager;
import org.eclipse.emf.cdo.internal.server.ResourceManager;
import org.eclipse.emf.cdo.internal.server.RevisionManager;
import org.eclipse.emf.cdo.internal.server.Session;
@@ -40,7 +40,7 @@ public abstract class CDOServerIndication extends IndicationWithResponse
return signalID;
}
- protected CDOPackageManagerImpl getPackageManager()
+ protected RepositoryPackageManager getPackageManager()
{
return getRepository().getPackageManager();
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RegisterPackagesIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RegisterPackagesIndication.java
index e819e63..795d2d1 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RegisterPackagesIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RegisterPackagesIndication.java
@@ -11,7 +11,7 @@
package org.eclipse.emf.cdo.internal.server.protocol;
import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl;
-import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageManagerImpl;
+import org.eclipse.emf.cdo.internal.server.RepositoryPackageManager;
import org.eclipse.emf.cdo.protocol.CDOProtocolConstants;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
@@ -33,7 +33,7 @@ public class RegisterPackagesIndication extends CDOServerIndication
@Override
protected void indicating(ExtendedDataInputStream in) throws IOException
{
- CDOPackageManagerImpl packageManager = getPackageManager();
+ RepositoryPackageManager packageManager = getPackageManager();
int size = in.readInt();
CDOPackageImpl[] newPackages = new CDOPackageImpl[size];
for (int i = 0; i < size; i++)
@@ -51,5 +51,6 @@ public class RegisterPackagesIndication extends CDOServerIndication
@Override
protected void responding(ExtendedDataOutputStream out) throws IOException
{
+ out.writeBoolean(true);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOPackageRegistryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOPackageRegistryImpl.java
index 7b30e77..461c9f5 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOPackageRegistryImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOPackageRegistryImpl.java
@@ -72,12 +72,12 @@ public class CDOPackageRegistryImpl extends EPackageRegistryImpl implements CDOP
return new CDOFactoryImpl(ePackage);
}
- private boolean isDynamicPackage(EPackage ePackage)
+ private static boolean isDynamicPackage(EPackage ePackage)
{
return ePackage.getClass() == EPackageImpl.class;
}
- private void fixEClassifiers(EPackageImpl ePackage)
+ private static void fixEClassifiers(EPackageImpl ePackage)
{
try
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RegisterPackagesRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RegisterPackagesRequest.java
index 0d397b8..10db974 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RegisterPackagesRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RegisterPackagesRequest.java
@@ -47,6 +47,7 @@ public class RegisterPackagesRequest extends CDOClientRequest
@Override
protected Object confirming(ExtendedDataInputStream in) throws IOException
{
+ in.readBoolean();
Set<String> knownPackages = getSession().getPackageURIs();
for (CDOPackageImpl newPackage : newPackages)
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/EMFUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/EMFUtil.java
index ef33a5e..dedddce 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/EMFUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/EMFUtil.java
@@ -222,16 +222,18 @@ public final class EMFUtil
cdoPackage.setClientInfo(ePackage);
for (EClass eClass : getPersistentClasses(ePackage))
{
- CDOClassImpl cdoClass = convertClass(eClass, packageManager);
+ CDOClassImpl cdoClass = convertClass(cdoPackage, eClass, packageManager);
cdoPackage.addClass(cdoClass);
}
return cdoPackage;
}
- private static CDOClassImpl convertClass(EClass eClass, CDOPackageManagerImpl packageManager)
+ private static CDOClassImpl convertClass(CDOPackageImpl containingPackage, EClass eClass,
+ CDOPackageManagerImpl packageManager)
{
- CDOClassImpl cdoClass = new CDOClassImpl(eClass.getClassifierID(), eClass.getName(), eClass.isAbstract());
+ CDOClassImpl cdoClass = new CDOClassImpl(containingPackage, eClass.getClassifierID(), eClass.getName(), eClass
+ .isAbstract());
cdoClass.setClientInfo(eClass);
// XXX for (EClass superEClass : eClass.getESuperTypes())
@@ -242,7 +244,7 @@ public final class EMFUtil
for (EStructuralFeature eFeature : getPersistentFeatures(eClass.getEStructuralFeatures()))
{
- CDOFeatureImpl cdoFeature = convertFeature(eFeature, packageManager);
+ CDOFeatureImpl cdoFeature = convertFeature(cdoClass, eFeature, packageManager);
cdoClass.addFeature(cdoFeature);
}
@@ -251,31 +253,34 @@ public final class EMFUtil
return cdoClass;
}
- private static CDOFeatureImpl convertFeature(EStructuralFeature eFeature, CDOPackageManagerImpl packageManager)
+ private static CDOFeatureImpl convertFeature(CDOClassImpl containingClass, EStructuralFeature eFeature,
+ CDOPackageManagerImpl packageManager)
{
- CDOFeatureImpl cdoFeature = isReference(eFeature) ? convertReference(eFeature, packageManager)
- : convertAttribute(eFeature);
+ CDOFeatureImpl cdoFeature = isReference(eFeature) ? convertReference(containingClass, eFeature, packageManager)
+ : convertAttribute(containingClass, eFeature);
cdoFeature.setClientInfo(eFeature);
return cdoFeature;
}
- private static CDOFeatureImpl convertReference(EStructuralFeature eFeature, CDOPackageManagerImpl packageManager)
+ private static CDOFeatureImpl convertReference(CDOClassImpl containingClass, EStructuralFeature eFeature,
+ CDOPackageManagerImpl packageManager)
{
int featureID = eFeature.getFeatureID();
String name = eFeature.getName();
CDOClassRefImpl classRef = createClassRef(eFeature.getEType());
boolean many = eFeature.isMany();
boolean containment = isContainment(eFeature);
- return new CDOFeatureImpl(featureID, name, new CDOClassProxy(classRef, packageManager), many, containment);
+ return new CDOFeatureImpl(containingClass, featureID, name, new CDOClassProxy(classRef, packageManager), many,
+ containment);
}
- private static CDOFeatureImpl convertAttribute(EStructuralFeature eFeature)
+ private static CDOFeatureImpl convertAttribute(CDOClassImpl containingClass, EStructuralFeature eFeature)
{
int featureID = eFeature.getFeatureID();
String name = eFeature.getName();
CDOTypeImpl type = getCDOType(eFeature);
boolean many = isMany(eFeature);
- return new CDOFeatureImpl(featureID, name, type, many);
+ return new CDOFeatureImpl(containingClass, featureID, name, type, many);
}
private static void initAllSuperTypes(CDOClassImpl cdoClass, CDOPackageManagerImpl packageManager)
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java
index d678726..93f0999 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java
@@ -52,5 +52,10 @@ public abstract class IndicationWithResponse extends SignalReactor
protected abstract void indicating(ExtendedDataInputStream in) throws IOException;
+ /**
+ * <b>Important Note:</b> The response must not be empty, i.e. the stream
+ * must be used at least to write a <code>boolean</code>. Otherwise
+ * synchronization problems will result!
+ */
protected abstract void responding(ExtendedDataOutputStream out) throws IOException;
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java
index fee5017..ad9634c 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java
@@ -54,5 +54,10 @@ public abstract class RequestWithConfirmation<RESULT> extends SignalActor<RESULT
protected abstract void requesting(ExtendedDataOutputStream out) throws IOException;
+ /**
+ * <b>Important Note:</b> The confirmation must not be empty, i.e. the stream
+ * must be used at least to read a <code>boolean</code>. Otherwise
+ * synchronization problems will result!
+ */
protected abstract RESULT confirming(ExtendedDataInputStream in) throws IOException;
}