Ehcache 2.10.6 | FAQ | Questions about Development | Replicated Cache
 
Replicated Cache
How many threads does Ehcache use and how much memory does that consume?
The amount of memory consumed per thread is determined by the stack size. This is set using -Xss. The amount varies by OS. The default is 512KB (for Linux), but 100kb is also recommended. The threads are created per cache as follows: * DiskStore expiry thread - if DiskStore is used * DiskStore spool thread - if DiskStore is used * Replication thread - if asynchronous replication is configured. If you are not doing any of the above, no extra threads are created.
Why can't I run multiple applications using Ehcache on one machine?
With JDK versions prior to JDK1.5, the number of RMI registries is limited to one per virtual machine, and therefore Ehcache is limited to one CacheManager per virtual machine operating in a replicated cache topology. Because this is the expected deployment configuration, however, there should be no practical effect. The telltale error is:
java.rmi.server.ExportException: internal error: ObjID already in use
On JDK1.5 and higher, it is possible to have multiple CacheManagers per VM, each participating in the same or different replicated cache topologies. Indeed, the replication tests do this with five CacheManagers on the same VM, all run from JUnit.

Copyright © 2010-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.