Never used a cache like this before. The problem is that I want to load 500,000 + records out of a database and do some selecting/filtering wicked fast.
I'm thinking about using a cache, and preliminarily found EHCache and OSCache, any opinions?
...
I've set hibernate.generate_statistics=true and now need to register the mbeans so I can see the statistics in the jmx console. I can't seem to get anywhere and this doesn't seem like it should be such a difficult problem. Maybe I'm making things overcomplicated, but in any case so far I've tried:
I copied EhCacheProvider and had it in...
Hi
I am using ehCache to store larges amount of data.
This cache is accessed about 3 times every second and must be kept up to date.
I have a thread that runs which retrieves all the data i need for the cache from the database every minute into a different cache(different cachemanager also).
What i want to do is copy the contents of the...
I plan to use a distributed cache in my load-balanced webapp.
So I'm going to try to abstract out the common functions between apache ehcache and memcached.
My goal is to be able to make a simple configuration switch to select the caching solution to use. Should I go the SPI route e.g. like how XML parsers are wired in ?
...
I have 2 different webapps (package into different war files) which needs to share some data via a cache (ehcache). I want to test out this idea with you to see if it works.
My idea is to create a service that bootstraps/accesses the ehcache and package that inside a jar. Then package that jar into the two wars:
WAR1: ehcache-service....
I have an application in need of some caching, and for some of the semi-static data, I want them to stay in the cache a maximum amount of time (for instance 10 minutes) before being refreshed. My system merely retrieves data, never updates it, so I have no idea of when to flush the cache using the property. In the OSCache docs, such an ...
I use
Tomcat
C3p0 (JNDI configured inside Tomcat)
MySQL(InnoDB) / Derby(not embedded) as Database
EHCache (in Memory)
Hibernate
Testmachine runs WinXP
I used Derby for development and wanted to switch to MySQL.
I was surprised to see, that with MySQL my Tests were app. 50% slower than with Derby.
My Testscenario :
app. 2000 Selec...
Hi All,
I'm currently investigating how to use the RMI distribution option in ehcache. I've configured properly ehcache.xml and replication seems to work fine. However I've 2 questions:
-> It seems ehcache/ hibernate creates 1 cache per Entity. This is fine, however when replication is in place it create 1 thread / cache to replicate...
I'm trying to use declarative caching from the Spring Modules project.
It's not working ie. nothing appears to be getting cached.
Here's my configuration:
<bean id="cacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
</bean>
<bean id="cacheProviderFacade"
class="org.springmodules.cache.provider.eh...
I'd like to implement the following algorythm above Ehcache :
try to get an element from the cache
if the element is not expired
serve the value
else
serve the expired value
refresh the element in the background
But I never get an expired element (Element.isExpired()). I tried to play with my cache configuration (especially TimeT...
I am having trouble with getting some caching to work with hibernate exactly the way I would like. I created some example code to replicate this problem I am having.
I have one object that contains instances of itself. For instance, a Part that is made up of more Parts.
I really need to minimize the select statements that Hibernat...
I want to distribute my EhCache via a JMS Topic. This is documented here on EhCache's site
I'm using:
ehcache-1.6.0-beta3
ehcache-jmsreplication-0.3
spring-2.5
spring-modules-0.9
My Spring config looks like this:
<bean id="cacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
</bean>
<bean id=...
I am looking for a simple in-memory (and in-process) cache for short-term caching of query data (but short-term meaning beyond request/response, i.e. session boundary).
EhCache would probably work, but it looks as if it might not offer one thing that I need: limits not on number of objects cached, but (approximate) limit on amount of mem...
I am using hibernate as my ORM solution, with EHCache as the Second Level (Read-Write) cache.
My question is: Is it possible to access the Second Level cache directly?
I want to access this: http://www.hibernate.org/hib_docs/v3/api/org/hibernate/cache/ReadWriteCache.html
How can I access the same ReadWriteCache that is being used b...
Hi I've run into some problems with hibernate 2nd level cache.
As cache provider I use ehcache.
Part of config from persistence.xml
<property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.EhCacheProvider" />
<property name="hibernate.cache.pr...
I have been trying to figure out this problem for a month or so now, and it has been driving me crazy.
Basically I want to keep this from happening:
FINEST: Cached item was locked: com.cache.dataobject.Part.parts#0
FINE: select parts0_.mainPart_id as mainPart3_1_, parts0_.id as id1_, parts0_.id as id182_0_, parts0_.mainPart_id as mai...
Hello guys,
I've set up ehcache on our Java application, which uses Spring and Hibernate.
However, when I run Junit tests and print the stats, it seems there is nothing in cache:
OUTPUT OF CACHE MANAGER STATS ON EVERY CACHE:
COM.****.SERVICES.CLARITY.DOMAIN.ACTIONITEM.BYRESOURCEUNIQUENAME:
getCacheHits: 0
getCacheMisses: 0
getObjectC...
I'm thinking about using the java application object to implement a simple cache, to save a few configuration variables, and a couple of xml with often used info...
I'd like to know where is the application data phisically stored (a system file, in memory, db), how can it be configured, and if there's any kind of limitation, like space,...
I am trying to set up ehcache replication as documented here: http://ehcache.sourceforge.net/EhcacheUserGuide.html#id.s22.2
This is on a Windows machine but will ultimately run on Solaris in production.
The instructions say to set up a provider as follows:
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICac...
We are considering using ehcache (1.6.0-beta5) to enable second level caching of a number of tables which are never modified. We have set up a read-only ehcache region for this table and currently it seems to be working fine. The Hibnerate POJOs stored in the cache are all immutable.
One of the developers here raised an issue that the...