ehcache

Any ehcache standalone example projects I can download?

I'm a little overwhelmed reading through the ehcache user guide http://ehcache.org/EhcacheUserGuide.html#id.s20. I'm trying to figure out how to set up a simple ehcache app that has a distributed cache. I'd like to just run the app multiple times and have it share the cache between the multiple instances. Is there an example app I can j...

Hibernate 2nd level cache invalidation when another process modifies the database

We have an application that uses Hibernate's 2nd level caching to avoid database hits. I was wondering if there is some easy way to invalidate the Java application's Hibernate 2nd level cache when an outside process such as a MySQL administrator directly connected to modify the database (update/insert/delete). We are using EHCache as...

@Cache annotation usage error

I added the following annotation to enable cache to one of my EJB3 entities, to test caching with ehCache, where I use Hibernate as the persistence provider: .... import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; @Entity @Table(name = "F") @Cache(usage=CacheConcurrencyStrategy.READ_WRITE...

Seam cache provider with ehcache null

Hi every one, I'm trying to configure seam/ehcache following the tutorial from jboss page: http://docs.jboss.org/seam/2.1.2/reference/en-US/html/cache.html I put the ehcache.1.2.3.jar in project.ear/lib and injected CacheProvider as especified, but the CacheProvider always return null. The documentation doesn't show any aditional conf...

EHCache error on looking up by cache key

Hi All, I am using EHCache 1.5.0 on a webapp running on WebLogic 9.1 instance and once in a while I run into the following error while getting an element from cache or while checking if an item exists in cache. Has anyone else seen this issue, any suggestions on how to fix this would be great code that causes this issue getMyCache().i...

ehcache persist to disk issues

I want to do something with ehcache in Java that I think should be extremely simple, but I've spent enough time frustrating myself with the docs... Write a value to a disk persistent cache. Shut down. Start up again and read that value. Here is my Java function: private static void testCacheWrite() { // create the cache manager fr...

hibernate ehcache only finding 1 element of a collection

so, i am really clutching at straws for ideas here. (also note: this is an intermittent problem) i have a 'parent' object with a collection of 'child' objects: <parent stuff> ... <set name="children" inverse="true" order-by="child_id"> <cache usage="read-write"/> <key column="parent_id"/> <on...

EntityDelete ColdFusion EHCache

How do i delete an Hibernate Entity that is being cached by EHcache and by using Entitydelete in coldfusion? ...

ehcache warnning message " No configuration found"

I have got following warning when the application start up. 2009-05-13 09:19:41,171 WARN net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath:jar:file:/app/java/lib/ehcache-1.1.jar!/ehcache-failsafe.xml I found encache code in following url .. Configuration...

hibernatetemplate clear ehcache?

<ehcache> <cache name="query.ContactInfoList" maxElementsInMemory="200" eternal="true" overflowToDisk="false" timeToIdleSeconds="300" timeToLiveSeconds="600" /> </ehcache> public List getContactInfoList(){ hibernateTemplate.setCacheQueries(true); hibernateTemplate.setQueryCacheRegi...

Is there something like asynchronous caching with ehcache and springmodules?

Is it possible to have cached queries asynchronous, so that no frontend user actually has to wait for a heavy query to finish? (I.e. heavy query is running as background thread, while (expired) data is delivered from cache. Use case: A web page displaying data, needing some time (too long to wait for when requesting a page) to be collec...

cannot do 2nd level cache

in my applicationcontext.xml <bean id="annotatedsessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="packagesToScan" value="testonly.package.model" /> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect...

hibernate cache strategy

how to decide whitch CacheConcurrencyStrategy to use? NonstrictReadWriteCache, ReadOnlyCache, ReadWriteCache, TransactionalCache . I read https://www.hibernate.org/hib%5Fdocs/v3/api/org/hibernate/cache/CacheConcurrencyStrategy.html but doesn't explain in detail enough ...

config ehcache.xml for jpa entity or use annotation?

when using ehcache rather than defining statement like <cache name="testonly.package.model.TestPOJOcategory" maxElementsInMemory="200" eternal="true" overflowToDisk="false" timeToIdleSeconds="300" timeToLiveSeconds="600" /> can directly define inside entity independent of whatever cache pro...

hibernate don't read from ehcache.xml OR not timeout?

This is how my entity look like @Entity @Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) @Table(name = "TestPojoOnly") @NamedQueries({@NamedQuery(name = "TestPojoOnly.findAll", query = "SELECT h FROM TestPojoOnly h"), @NamedQuery(name = "TestPojoOnly.findById", query = "SELECT h FROM TestPojoOnly h WHERE h.id = :id"), @Na...

Architecture question for implementation of a cache server

Hello. This is something of an architecture question. I have this idea of having a server with huge memory, that is used as a big objects cache holder. The clients send "Actions" to this server(like Search Person with property age<13). And then, this machine(to complicate things it would be nice to have more instances of this server and...

building a high scale java app, what stack would you use?

if you needed to build a highly scalable web application using java, what framework would you use and why? I'm just reading thinking-in-java, head first servlets and manning's spring framework boo, but really I want to focus on highly scalable architectures etc. would you use tomcat, hibernate, ehcache? (just assume you have to design...

Ehcache Statistics by key

Hello all! I am interested in getting statistics on the Ehcache I have running. I would like to see the number of hits/misses for a given key over a period of time. Perhaps in the form of a map. For example. For the passed hour (or however long it has been running) Key A had 30 hits and 2 misses Key B had 400 hits and 100 misses...

Cache integrity problem

I have an application that uses ehcache for cache (but I think this problem is framework-agnostic), with a method interceptor so basically if I mark my method for caching something like this happnes: public Object invoke(MethodInvocation mi) throws Throwable { Object result = cache.get(key); //key comes from MethodInvoc...

problem creating an EhCache Cache from spring

Reading the javadoc for EhCacheManagerFactoryBean and EhCacheFactoryBean I figured that: <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:configLocation="classpath:ehcache.xml"/> <bean id="locationCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean" p:cacheManager-ref="...