thread « Cache « JPA Q&A





1. Ehcache write-behind caching thread-priority    stackoverflow.com

I'm trying to use Ehcache write-behind caching to write batches of transactions to my database. What I need is for the write-behind cache to dump transactions at 5 second intervals (or ...

2. Is cache in ResourceBundleMessageInterpolator thread-safe?    forum.hibernate.org

Hi! While trying to implement my own mod of MessageInterpolator, stumbled on ResourceBundleMessageInterpolator cache. As is written in Java6SE API, WeakHashMap, which is used for cache, is not thread-safe. And I haven't seen any synchronization routines in the code. Version 4.1.0.Final: Code: /** * Resource bundle backed message interpolator. * * @author Emmanuel Bernard * @author Hardy Ferentschik * @author Gunnar ...

3. Cache, session, threads - possible pattern    forum.hibernate.org

My application has about 20 threads (takes from pool). This what I'm thinking about: 1) I use the ThreadLocalSession to associate a session with each thread. 2) I always keep the session open (or should I disconnect() after each RMI request ?) in order to make caching work 3) When the application ends, I have a finalizer in the ThreadLocalSession class ...

4. EHCache thread leak?    forum.hibernate.org

I've found that when using the 2nd level cache with EHCache, it seems to leak one thread for every cached entity and two for the query cache. This is after calling sessionfactory.close(), which is supposed to release all resources relating to the sessionfactory. Oddly, it is only the threads marked 'Expiry' that leak. Each 'Expiry' thread has a counterpart 'Spool' thread, ...

5. VM wide Object caching, Thread Local requirements questions    forum.hibernate.org

Beginner Joined: Thu Feb 26, 2004 11:45 am Posts: 45 I am aware that there have been many disccussions in the forum related to this area, and i've been through them. I'm sorry to add yet another, i hope it's not too redundant. I'm looking more for the approach/direction. I'll worry about code and implementation separately. I've just begun using Hibernate. ...

6. multiple thread problem with EHCache    forum.hibernate.org

One thing I would like to add is that I do not have an entry in my ehcache.xml for this cache and therefore the cache gets created as the query executes. If it was in the ehcache.xml file the cache would have already been created at startup of ehcache and the problem would not occur. Nevertheless I still believe it is ...

7. 'Separate' ehcache in a user thread    forum.hibernate.org

Newbie Joined: Mon Nov 06, 2006 6:19 pm Posts: 16 Hello, I have a Seam+Hibernate app and I have setup a 2nd level cache for, using ehcache (1.2.3), for some of my entities. And it works fine, if I access the site using a browser. However, I also need to access the Seam components from a daemon thread; but the thread ...

8. Cache architecture and threading questions.    forum.hibernate.org

Greetings ! Im testing Hibernate for my company and have several questions abouts its caching capabilities. 1.Does Hibernate support servers-farm cache ? 2.Does it support multi-servers-farm cache ? (global orginization cache). 3.Can Hibernate be used for client caching ? (sit on the client station and be used as local caching). 4.Someone told me that Hibernate has difficulties handling several threads accessing ...