summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-25 13:02:06 (EDT)
committerEike Stepper2007-08-25 13:02:06 (EDT)
commit54bd3636c98820b9a1e88f00da363886667697ff (patch)
tree015dc25410b073668a1e1ee7840d23b0bd9ee77c
parentd66c3d23b46a43d7ba06d26a57019ebc6c2f510d (diff)
downloadcdo-54bd3636c98820b9a1e88f00da363886667697ff.zip
cdo-54bd3636c98820b9a1e88f00da363886667697ff.tar.gz
cdo-54bd3636c98820b9a1e88f00da363886667697ff.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TypeManager.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITypeManager.java3
2 files changed, 10 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TypeManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TypeManager.java
index 5b20c82..1eed461 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TypeManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TypeManager.java
@@ -74,7 +74,7 @@ public class TypeManager extends Lifecycle implements ITypeManager
CDOClassRef type = objectTypes.get(id);
if (type == null)
{
- type = loadTypeFromMap(id);
+ type = persistentLoadType(id);
if (type == null && storeReader != null)
{
type = storeReader.readObjectType(id);
@@ -91,12 +91,15 @@ public class TypeManager extends Lifecycle implements ITypeManager
return type;
}
- public void registerObjectType(CDOID id, CDOClassRefImpl type)
+ public void registerObjectType(CDOID id, CDOClassRef type)
{
objectTypes.putIfAbsent(id, type);
+ if (persistent)
+ {
+ }
}
- private CDOClassRef loadTypeFromMap(CDOID id)
+ protected CDOClassRef persistentLoadType(CDOID id)
{
TypeEntry entry = null;
if (id.isMeta())
@@ -142,6 +145,9 @@ public class TypeManager extends Lifecycle implements ITypeManager
@Override
protected void doDeactivate() throws Exception
{
+ IOUtil.close(metaObjectTypeMap);
+ IOUtil.close(objectTypeMap);
+ IOUtil.close(packageURIMap);
super.doDeactivate();
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITypeManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITypeManager.java
index ef6cc1c..ff83b10 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITypeManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITypeManager.java
@@ -10,7 +10,6 @@
**************************************************************************/
package org.eclipse.emf.cdo.server;
-import org.eclipse.emf.cdo.internal.protocol.model.CDOClassRefImpl;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.model.CDOClassRef;
@@ -23,5 +22,5 @@ public interface ITypeManager extends IRepositoryElement
public CDOClassRef getObjectType(IStoreReader storeReader, CDOID id);
- public void registerObjectType(CDOID id, CDOClassRefImpl type);
+ public void registerObjectType(CDOID id, CDOClassRef type);
}