General J2EE: Urgent! Java Hashtable with Weblogic
- Posted by: Thomas Hassler
- Posted on: July 14 2005 11:52 EDT
I am using a weblogic as the application sever for my
web application. In the Server side program, I use a Hashtable to store the java objects. Actually I didn't initialize the capacity size of the Hashtable. For some reason, I can't clear the content of Hashtable while the application is running. I would like to know will it cause
"Overflow" or memory leakage if the Hashtable size is getting bigger. Will it overflow if it contains more than
10,000 objects inside? Any suggestion? Thanks!
I can't clear the content of Hashtable while the application is running.
You can't, or the app is not written to do so?
I would like to know will it cause"Overflow" or memory leakage if the Hashtable size is getting bigger. Will it overflow if it contains more than10,000 objects inside? Any suggestion?
No, it will resize itself internally to handle 10000 or 100000 objects ..
Depending on the size of the objects stored in it, you will eventually run out of memory if the Hashtable keeps growing.
Tangosol Coherence: Clustered Shared Memory for Java
1) Storing all your Object to database ,instead of Memory
2) Using Fixed-size Map
3) Using WeakHashMap instead of Hashmap