summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-15 00:15:21 (EST)
committerEike Stepper2007-12-15 00:15:21 (EST)
commit0fbb634e5b04a79035322b391291e979af4cf20b (patch)
tree33772531a17b7270847cf8c68ee44d58ece5abc1
parentecfb0e67bcbfdb294dbf05e25a71fb9a5cf0cb4f (diff)
downloadcdo-0fbb634e5b04a79035322b391291e979af4cf20b.zip
cdo-0fbb634e5b04a79035322b391291e979af4cf20b.tar.gz
cdo-0fbb634e5b04a79035322b391291e979af4cf20b.tar.bz2
[213083] Release StoreReader in PackageManager.doActivate()
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213083
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/PackageManager.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/PackageManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/PackageManager.java
index e9a3790..5b925b7 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/PackageManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/PackageManager.java
@@ -70,11 +70,23 @@ public class PackageManager extends CDOPackageManagerImpl implements IPackageMan
protected void doActivate() throws Exception
{
super.doActivate();
- IStoreReader storeReader = repository.getStore().getReader(null);
- Collection<CDOPackageInfo> packageInfos = storeReader.readPackageInfos();
- for (CDOPackageInfo info : packageInfos)
+ IStoreReader storeReader = null;
+
+ try
{
- addPackage(new CDOPackageImpl(this, info.getPackageURI(), info.isDynamic(), info.getMetaIDRange()));
+ storeReader = repository.getStore().getReader(null);
+ Collection<CDOPackageInfo> packageInfos = storeReader.readPackageInfos();
+ for (CDOPackageInfo info : packageInfos)
+ {
+ addPackage(new CDOPackageImpl(this, info.getPackageURI(), info.isDynamic(), info.getMetaIDRange()));
+ }
+ }
+ finally
+ {
+ if (storeReader != null)
+ {
+ storeReader.release();
+ }
}
}