summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-10-03 05:18:56 (EDT)
committerEike Stepper2006-10-03 05:18:56 (EDT)
commita643b0221498a52fb726c2b2ec3f6ad3a9b83122 (patch)
tree2c538b6bf9170a134c3a1b3d11f75291f57a6996
parent9ec548028cd8d12a6fa92c29b7068b541577070a (diff)
downloadcdo-a643b0221498a52fb726c2b2ec3f6ad3a9b83122.zip
cdo-a643b0221498a52fb726c2b2ec3f6ad3a9b83122.tar.gz
cdo-a643b0221498a52fb726c2b2ec3f6ad3a9b83122.tar.bz2
[159561] Memory leak caused by blocked ResourceManager.Invalidator thread https://bugs.eclipse.org/bugs/show_bug.cgi?id=159561
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOProtocolImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOResProtocolImpl.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch13
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopology.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java31
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientSeparatedServerTopology.java88
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientServerTopology.java75
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientTopology.java30
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/EmbeddedTopology.java42
13 files changed, 311 insertions, 37 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
index bc8ef82..2dd0f31 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
@@ -239,6 +239,20 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
nextRID = selectMaxRID() + 1;
}
+ @Override
+ protected void deactivate() throws Exception
+ {
+ columnConverter = null;
+ dataSource = null;
+ jdbcTemplate = null;
+ oidEncoder = null;
+ packageManager = null;
+ resourceManager = null;
+ sqlDialectName = null;
+ cachedSqlDialect = null;
+ super.deactivate();
+ }
+
protected void initTables()
{
Database database = DBGenFactory.eINSTANCE.createDatabase();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java
index 40ea2d5..c7c5fad 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java
@@ -113,4 +113,15 @@ public class PackageManagerImpl extends ServiceImpl implements PackageManager
listener.notifyAddedPackage();
}
}
+
+ @Override
+ protected void deactivate() throws Exception
+ {
+ cidToClassInfoMap = null;
+ listeners = null;
+ nameToClassInfoMap = null;
+ packages = null;
+ subClassInfoMap = null;
+ super.deactivate();
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java
index c069c44..b3372de 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java
@@ -78,4 +78,12 @@ public class ResourceManagerImpl extends ServiceImpl implements ResourceManager
return resourceInfo;
}
+
+ @Override
+ protected void deactivate() throws Exception
+ {
+ pathToResourceMap = null;
+ ridToResourceMap = null;
+ super.deactivate();
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOProtocolImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOProtocolImpl.java
index 4fc631f..24b60de 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOProtocolImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOProtocolImpl.java
@@ -154,7 +154,8 @@ public class ServerCDOProtocolImpl extends AbstractCDOProtocol implements Server
}
catch (Exception ex)
{
- error("Error while transmitting invalidation notifications for oids " + changedObjectIds, ex);
+ error("Error while transmitting invalidation notifications for oids " + changedObjectIds,
+ ex);
}
}
}
@@ -184,8 +185,11 @@ public class ServerCDOProtocolImpl extends AbstractCDOProtocol implements Server
if (serverCDOResProtocol != null)
{
serverCDOResProtocol.removeListener(this);
+ serverCDOResProtocol = null;
}
+ mapper = null;
+ transactionTemplate = null;
super.deactivate();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOResProtocolImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOResProtocolImpl.java
index 8634f46..cace137 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOResProtocolImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOResProtocolImpl.java
@@ -55,7 +55,7 @@ public class ServerCDOResProtocolImpl extends AbstractCDOResProtocol implements
case DELETE_RESOURCES:
return new DeleteResourcesIndication();
-
+
default:
throw new ImplementationError("Invalid " + PROTOCOL_NAME + " signalId: " + signalId);
}
@@ -114,7 +114,7 @@ public class ServerCDOResProtocolImpl extends AbstractCDOResProtocol implements
listener.notifyRemoval(this, rids);
}
}
-
+
public void addListener(Listener listener)
{
listeners.add(listener);
@@ -131,4 +131,13 @@ public class ServerCDOResProtocolImpl extends AbstractCDOResProtocol implements
assertNotNull("mapper");
assertNotNull("transactionTemplate");
}
+
+ @Override
+ protected void deactivate() throws Exception
+ {
+ listeners = null;
+ mapper = null;
+ transactionTemplate = null;
+ super.deactivate();
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch b/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch
index 5214bdc..6264660 100644
--- a/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch
+++ b/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch
@@ -5,33 +5,42 @@
<booleanAttribute key="useProduct" value="false"/>
<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.net4j.examples.mvc.swt,org.eclipse.net4j.examples.prov.client.ui,org.eclipse.net4j.examples.mvc,org.eclipse.net4j.examples.prov.server,org.eclipse.emf.cdo.dbgen.edit,org.eclipse.emf.cdo.examples.library,org.eclipse.emf.cdo.examples.library.ui,org.eclipse.emf.cdo.analysis.gmf,org.eclipse.emf.cdo.mapping.editor,org.eclipse.net4j.examples.server,org.eclipse.net4j.tests,org.eclipse.emf.cdo.doc,org.eclipse.datatools.enablement.mysql,org.eclipse.net4j.spring.tests,org.eclipse.emf.cdo,org.eclipse.emf.cdo.dbgen.editor,org.eclipse.net4j.examples.prov.edit,org.eclipse.emf.cdo.utilities.migrator,org.eclipse.emf.cdo.analysis,org.eclipse.emf.cdo.examples.server,org.eclipse.datatools.enablement.mysql.dbdefinition,org.eclipse.net4j.examples.prov,org.eclipse.emf.cdo.examples.client,org.eclipse.emf.cdo.examples.ui,org.eclipse.net4j.examples.client.ui,org.eclipse.net4j.examples.client,org.eclipse.net4j.doc,org.eclipse.net4j.examples.prov.client,org.eclipse.net4j.examples.prov.editor,org.eclipse.net4j"/>
<booleanAttribute key="tracing" value="false"/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_PROFILING_SET" value="tptp-dummy-profiling-set-CDO All Tests"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<stringAttribute key="selected_target_plugins" value="com.ibm.icu,org.apache.ant,org.apache.xerces,org.eclipse.ant.core,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.filesystem,org.eclipse.core.filesystem.win32.x86,org.eclipse.core.jobs,org.eclipse.core.resources,org.eclipse.core.resources.compatibility,org.eclipse.core.resources.win32,org.eclipse.core.runtime,org.eclipse.core.runtime.compatibility,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.core.variables,org.eclipse.emf.common,org.eclipse.emf.ecore,org.eclipse.emf.ecore.change,org.eclipse.emf.ecore.edit,org.eclipse.emf.ecore.xmi,org.eclipse.emf.edit,org.eclipse.emf.ocl,org.eclipse.equinox.common,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.osgi,org.eclipse.update.configurator,org.junit"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="/AllTests.txt"/>
<booleanAttribute key="automaticValidate" value="true"/>
+<booleanAttribute key="org.eclipse.hyades.trace.ui.ATTR_SHOW_HEAP_INSTANCES" value="true"/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DESTINATION_FILE" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DATA_COLLECTOR" value="org.eclipse.tptp.trace.ui.jvmpiMechanism:org.eclipse.tptp.analysisType.memoryHeap"/>
<booleanAttribute key="automaticAdd" value="false"/>
<stringAttribute key="checked" value="[NONE]"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.jdbc,org.eclipse.net4j.spring,org.eclipse.net4j.socket,org.eclipse.net4j.core,org.eclipse.net4j.spring.db,org.eclipse.emf.cdo.dbgen,org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.mapping,org.eclipse.emf.cdo.core,org.eclipse.emf.cdo.client,org.eclipse.net4j.util,org.eclipse.emf.cdo.server,org.eclipse.emf.cdo.client.ocl,org.eclipse.net4j.embedded,org.eclipse.emf.cdo.jdbc.derby,org.eclipse.emf.cdo.dbgen.derby,org.eclipse.emf.cdo.dbgen.oracle,org.eclipse.emf.cdo.jdbc.hsqldb,org.eclipse.emf.cdo.jdbc.mysql,org.eclipse.emf.cdo.dbgen.ansi92,org.eclipse.emf.cdo.dbgen.mysql,org.eclipse.emf.cdo.dbgen.hsqldb"/>
+<booleanAttribute key="org.eclipse.hyades.trace.ui.ATTR_PROFILE_TO_FILE" value="false"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.jdbc,org.eclipse.net4j.spring,org.eclipse.net4j.socket,org.eclipse.net4j.core,org.eclipse.net4j.spring.db,org.eclipse.emf.cdo.dbgen,org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.mapping,org.eclipse.emf.cdo.core,org.eclipse.emf.cdo.client,org.eclipse.net4j.util,org.eclipse.emf.cdo.client.ocl,org.eclipse.emf.cdo.server,org.eclipse.net4j.embedded,org.eclipse.emf.cdo.jdbc.derby,org.eclipse.emf.cdo.dbgen.derby,org.eclipse.emf.cdo.dbgen.oracle,org.eclipse.emf.cdo.jdbc.hsqldb,org.eclipse.emf.cdo.jdbc.mysql,org.eclipse.emf.cdo.dbgen.ansi92,org.eclipse.emf.cdo.dbgen.mysql,org.eclipse.emf.cdo.dbgen.hsqldb"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="clearws" value="true"/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DESTINATION_MONITOR" value="DefaultMonitor"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.model1.AllTests"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="false"/>
<stringAttribute key="pde.version" value="3.2a"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="default" value="false"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DESTINATION_PROJECT" value="ProfileProject"/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
index 83ad15b..f5a5736 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
@@ -47,6 +47,7 @@ public class AllSuites extends TestSuite
protected void populateSuite()
{
+ // String mode = ITopologyConstants.EMBEDDED_MODE;
for (String mode : ITopologyConstants.SELF_CONTAINED_MODES)
{
TestSuite topologySuite = new TestSuite("Mode " + mode);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopology.java
index 299f443..6526bdf 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopology.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopology.java
@@ -57,8 +57,20 @@ public abstract class AbstractTopology implements ITopology
public void stop() throws Exception
{
- cdoClient.stop();
- cdoClient = null;
+ try
+ {
+ cdoClient.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ cdoClient = null;
+ }
+
+ bundleLocation = null;
}
public ResourceManager createResourceManager(ResourceSet resourceSet)
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
index ab505cb..fb665ea 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
@@ -35,6 +35,12 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
private ITopology topology;
+ private long startMemory;
+
+ private String label;
+
+ private static int run;
+
public String getMode()
{
return mode;
@@ -58,9 +64,13 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
@Override
protected void setUp() throws Exception
{
+ System.gc();
+ startMemory = getUsedMemory();
+
if (topology == null) topology = createTopology();
+ label = getName() + " [" + topology.getName() + "]";
System.out.println("=========================================================================");
- System.out.println("TC_START " + getName() + " [" + topology.getName() + "]");
+ System.out.println("TC_START " + label);
System.out.println("=========================================================================");
super.setUp();
@@ -74,15 +84,32 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
wipeDatabase(jdbc);
topology.stop();
+ topology = null;
super.tearDown();
+ System.gc();
+ long endMemory = getUsedMemory();
+
+ System.out.println("Memory-Delta " + getRun() + "\t " + (endMemory - startMemory));
System.out.println("=========================================================================");
- System.out.println("TC_END " + getName() + " [" + topology.getName() + "]");
+ System.out.println("TC_END " + label);
System.out.println("=========================================================================");
System.out.println();
System.out.println();
System.out.println();
System.out.println();
+ label = null;
+ mode = null;
+ }
+
+ private static long getUsedMemory()
+ {
+ return Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
+ }
+
+ private static String getRun()
+ {
+ return String.format("%4d", new Object[] { ++run});
}
protected void wipeDatabase(JdbcTemplate jdbc)
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientSeparatedServerTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientSeparatedServerTopology.java
index e4dede0..6a4c770 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientSeparatedServerTopology.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientSeparatedServerTopology.java
@@ -62,17 +62,83 @@ public class ClientSeparatedServerTopology extends AbstractTopology
{
super.stop();
- //Stop client
- net4jClient.stop();
- clientNet4j.stop();
-
- //Stop server
- acceptor.stop();
- acceptor = null;
-
- cdoServer.stop();
- net4jServer.stop();
- serverNet4j.stop();
+ try
+ {
+ net4jClient.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ net4jClient = null;
+ }
+
+ try
+ {
+ clientNet4j.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ clientNet4j = null;
+ }
+
+ try
+ {
+ acceptor.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ acceptor = null;
+ }
+
+ try
+ {
+ cdoServer.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ cdoServer = null;
+ }
+
+ try
+ {
+ net4jServer.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ net4jServer = null;
+ }
+
+ try
+ {
+ serverNet4j.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ serverNet4j = null;
+ }
}
public DataSource getDataSource()
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientServerTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientServerTopology.java
index c15bdc1..56fade7 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientServerTopology.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientServerTopology.java
@@ -59,17 +59,70 @@ public class ClientServerTopology extends AbstractTopology
{
super.stop();
- //Stop client
- net4jClient.stop();
-
- //Stop server
- acceptor.stop();
- acceptor = null;
-
- cdoServer.stop();
- net4jServer.stop();
-
- net4j.stop();
+ try
+ {
+ net4jClient.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ net4jClient = null;
+ }
+
+ try
+ {
+ acceptor.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ acceptor = null;
+ }
+
+ try
+ {
+ cdoServer.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ cdoServer = null;
+ }
+
+ try
+ {
+ net4jServer.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ net4jServer = null;
+ }
+
+ try
+ {
+ net4j.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ net4j = null;
+ }
}
public DataSource getDataSource()
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientTopology.java
index 80fd02d..e0dec1c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientTopology.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientTopology.java
@@ -15,6 +15,7 @@ import org.eclipse.net4j.spring.Container;
import javax.sql.DataSource;
+
/*
* TODO Test this topology (need external server for that)
*/
@@ -47,9 +48,32 @@ public class ClientTopology extends AbstractTopology
{
super.stop();
- //Stop client
- net4jClient.stop();
- net4j.stop();
+ try
+ {
+ net4jClient.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ net4jClient = null;
+ }
+
+
+ try
+ {
+ net4j.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ net4j = null;
+ }
}
public DataSource getDataSource()
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/EmbeddedTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/EmbeddedTopology.java
index 1c0e12f..7771fe1 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/EmbeddedTopology.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/EmbeddedTopology.java
@@ -45,9 +45,45 @@ public class EmbeddedTopology extends AbstractTopology
public void stop() throws Exception
{
super.stop();
- cdoServer.stop();
- net4jEmbedded.stop();
- net4j.stop();
+
+ try
+ {
+ cdoServer.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ cdoServer = null;
+ }
+
+ try
+ {
+ net4jEmbedded.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ net4jEmbedded = null;
+ }
+
+ try
+ {
+ net4j.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ net4j = null;
+ }
}
public DataSource getDataSource()