INTEGRATION: CWS sdk10 (1.11.52); FILE MERGED

2004/02/03 14:49:08 mi 1.11.52.2: RESYNC: (1.11-1.13); FILE MERGED
2003/11/27 15:51:59 sb 1.11.52.1: #i19974# After destroying a bridge, a newly created bridge with the same from/to pair as the old one will use the same java_environment as the old one, so make sure all proxies from the old bridge get removed from the java_environment when the old bridge is disposed.
This commit is contained in:
Kurt Zenker
2004-05-19 10:46:21 +00:00
parent 6fde91a3d6
commit 9de0322757

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: java_environment.java,v $
*
* $Revision: 1.14 $
* $Revision: 1.15 $
*
* last change: $Author: kz $ $Date: 2004-03-25 14:54:11 $
* last change: $Author: kz $ $Date: 2004-05-19 11:46:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -159,6 +159,17 @@ public final class java_environment implements IEnvironment {
// }
}
/**
* Revokes all registered proxy interfaces.
*
* <p>This method should be part of <code>IEnvironment</code>. It is called
* from <code>com.sun.star.lib.uno.bridges.java_remote.<!--
* -->java_remote_bridge.dispose</code>.</p>
*/
public void revokeAllProxies() {
proxies.clear();
}
// TODO What's this??? java.lang.Object#equals requires reflexivity...
//
// Maybe this was hacked in so that different bridges use different
@@ -235,6 +246,13 @@ public final class java_environment implements IEnvironment {
}
}
public void clear() {
synchronized (map) {
map.clear();
cleanUp();
}
}
// must only be called while synchronized on map:
private void cleanUp() {
for (;;) {