ehcache

exception when invoking ehcache-server within embedded Jetty via Cargo: WebApplicationProviderImpl could not be instantiated

I'm working on a web application that uses a standalone ehcache server to cache certain data. The ehcache server is accessed via REST (as opposed to SOAP). For functional testing purposes, I need to run an embedded instance of the ehcache server. The echcache-server project itself does this for its own functional tests, using the Cargo ...

Hibernate second-level cache ehcache.xml, the cache setting for entities can't be read to HIbernate

To make it clear and easy, I have two projects: 1. An Entity project where there are all the entity classes in this project. 2. An project that contains a main() function to run the application, My ehcache.xml is placed in the class path of this project. My problem is: I can change the defaultCache element of ehcache.xml and I can see c...

Ehcache & MultiThreading

Does ehcache support multi-threading by default or does it require any configuration changes? On multi threading my application with Ehcache i found that the DB hit count is actually increasing i.e. there is no global cache available for all the threads despite the fact that my cache's are all Singletons. Any suggestions? ...

How to config QueryCache in ehcache.xml

From my sql log file, I think the QueryCache's physical properties are configured by the element: <defaultCache maxElementsInMemory="0" eternal="false" timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="false" memoryStoreEvicti...

Durable queue configuration in Terracotta

Does anyone know how to configure durable queue on Terracotta server properly? Terracotta stores clustered objects on server in files and writes data to them in append only fashion. I want to control how this internal data gets cleared somehow. I have multiple intensive applications that use common ehcache instance clustered by T...

Caching in J2EE application

I use JBoss AS. I have a long and heavy SQL that run inside the application server. I want to cache the results based on input parameters. I have a few options here: Use a caching manager and manually putting the results in the cache. Use a caching manager with loader that will "load" the results into cache when there's no results in ...

EHCache Disable

Is there a way to disable ehache externally using a property file? CacheManager.shutdown() doesnt seem to work? Actually we have 2 app with the same source code i require ehcache in one and not the other. one where i dont need cache is a webapp! Unable to figure to out yet how to go about this? ...

EHCache Disable/Shutdown

Is there a way to disable ehache externally using a property file? CacheManager.shutdown() doesnt seem to work? Actually we have 2 app with the same source code i require ehcache in one and not the other. one where i dont need cache is a webapp! Unable to figure to out yet how to go about this? ...

Ehcache performance on a large cluster

I would like to use Ehcache replicated cache, first as the backend to Hibernate second level cache, second as a cache for any data. I know how a distributed cache like memcached is working, and I know it can scale to large clusters, but I cannot find how Ehcache replication behaves on large clusters. Has someone a pointer to some info...

Hibernate Second level Cache <<net.sf.ehcache.hibernate.EhCacheProvider>>

Hi every one, I want use second level cache in my hibernate Project but I just know a little about hibernate second level cache, can any one explain how shoud I use this in my code and what configuration and .jar file I need? I set these setting to my hibernate.cfg.xml file <property name="hibernate.cache.use_query_cache">true</propert...

Configuring EhCache on JBoss

Ok this is driving me crazy.... Server: JBoss 4.0.5 I have my hibernate-service.xml where I include the: <attribute name="CacheProviderClass"> org.hibernate.cache.EhCacheProvider </attribute> Which seems to work fine in terms of loading and getting the ehcache started, but I do see this pesky message about: WARNING: No conf...

Hibernate + EhCache, keep missing the cache

I've configure a few of my objects to be cacheable ( on the mapping file) and from what I can see for this particular object the cache is not working so well. For other objects I see the hit count increasing on each iteration, but the missed count as 0, whereas for this one I see it misses every single time for the session. Elements i...

ehcache auto-discovery (via multicast) between 2 instances on the same host

Hello I run 2 tomcat instances on the same host. Each instance runs the same web application which tries to communicate some ehcache caches via RMI replication. I use the autodiscovery configuration in ehcache so I don't have to explicitly define which are the hosts and which are the caches I want to replicate. The ehcache instances do ...

Hibernate 2nd level cache not caching committed entities

I'm wondering if it's possible for Hibernate second level cache (we're using EHCache) to allow an application to cache an Entity that has been comitted to the DB if it knows that no other applications are modifying the DB. My thought is that if I update record A, then I know the value of record A and should be able to cache that, JVM cl...

cache key generation

Hi, I'm using ehcache (via the Grails plugin). The method that adds objects to the cache requires the keys to be serializable, so a typical usage would be: def key = 22 def someObject = new Object(); cacheService.cache(key, true, someObject) (The boolean param indicates whether the object should be added to a distributed or local cac...

Hibernate/Ehcache: evicting collections from 2nd level cache not synchronized with other DB reads

I have an application using JPA, Hibernate and ehcache, as well as Spring's declarative transactions. The load on DB is rather high so everything is cached to speed things up, including collections. Now it is not a secret that collections are cached separately from the entities that own them so if I delete an entity that is an element of...

Overriding equals and hashCode methods for a JavaBeans implemented in Scala

Hello, I'm working on a project using iBatis and a Java caching tool ehcache but I'm implementing the model classes in Scala. I'm having a stong feeling that I'll have to override the equals and hashCode methods to enable the cache easily manage objects on it. Since most of the required properties in the scala classes are vars, I need ...

using ehcache blocking decorator with hibernate

Hello I'm using ehcache with hibernate and I'd like to use the blocking or SelfPopulating cache to avoid the issues presented in http://ehcache.org/documentation/constructs-0_5.html#mozTocId722946 An expensive operation is required, say rendering a large web page, which takes 30 seconds. The page is not considered stale until it is ...

Avoiding multiple repopulations of the same cache region (due to concurrency)

Hello I have a high traffic website and I use hibernate. I also use ehcache to cache some entities and queries which are required to generate the pages. The problem is "parallel cache misses" and the long explanation is that when the application boots and the cache regions are cold each cache region is being populated many times (inste...

Spring context property-placholder ehcahe configuration

I have a spring context xml file with this <context:property-placeholder location="classpath:cacheConfig.properties"/> <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> <property name="cacheManagerName" value="cacheName"/> <property name="shared" value="false"/> <property name=...