Author: unico
Date: Tue Aug 9 03:55:21 2005
New Revision: 231018
URL: http://svn.apache.org/viewcvs?rev=231018&view=rev
Log:
fix bug 34282, remove memory intensive uri cache,
thanks to Max Pfingsterhorn (m.pfingsterhorn at hippo dot nl)
Modified:
jakarta/slide/trunk/src/share/org/apache/slide/common/Namespace.java
Modified: jakarta/slide/trunk/src/share/org/apache/slide/common/Namespace.java
URL:
http://svn.apache.org/viewcvs/jakarta/slide/trunk/src/share/org/apache/slide/common/Namespace.java?rev=231018&r1=231017&r2=231018&view=diff
==============================================================================
--- jakarta/slide/trunk/src/share/org/apache/slide/common/Namespace.java
(original)
+++ jakarta/slide/trunk/src/share/org/apache/slide/common/Namespace.java Tue
Aug 9 03:55:21 2005
@@ -171,12 +171,6 @@
/**
- * Uri cache.
- */
- private Hashtable uriCache;
-
-
- /**
* Default descriptors store classname.
*/
private String defaultStoreClassname =
@@ -211,8 +205,7 @@
Namespace() {
stores = new Hashtable();
connectedServices = new Vector();
- name = "";
- uriCache = new Hashtable();
+ name = new String();
}
@@ -717,22 +710,8 @@
*/
public Uri getUri(SlideToken token, String uri, boolean forcedEnlistment) {
- Uri result = null;
- Object temp = null;
- temp = uriCache.get(uri);
- if (temp == null) {
- result = new Uri(token, this, uri);
- uriCache.put(uri, result);
- if (uriCache.size() > 10000) {
- clearUriCache();
- }
- } else {
- result = (Uri) temp;
- result = result.cloneObject();
- result.setToken(token);
- result.reconnectServices();
- }
-
+ Uri result = new Uri(token, this, uri);
+
// if a different forceEnlistment value want to be used
// wrap the used token to reflect the different value
if (token != null && token.isForceStoreEnlistment() !=
forcedEnlistment) {
@@ -743,14 +722,6 @@
return result;
- }
-
-
- /**
- * Clear uri cache.
- */
- void clearUriCache() {
- uriCache.clear();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]