-
1. Re: Jboss Cache and Hibernate Secondary Caching
brian.stansberry Feb 14, 2006 8:30 PM (in response to rknr55)My understanding of these terms is that Hibernate defines 4 cache types -- read-only, read-write, non-strict-read-write, and transactional. Transactional allows reads and writes and uses JTA transactions for coordinating access to cache data. JBossCache is transactional. It certainly supports coordination between multiple threads trying to read from and write to the cache.
-
2. Re: Jboss Cache and Hibernate Secondary Caching
jim_cross Jul 19, 2006 4:25 PM (in response to rknr55)Dragging up a bit of an old thread here I know, but...
I've just started evaluating various caching strategies for use with Hibernate. I guess this question originally came from reading a table such as the one near the bottom of this page http://www.devx.com/dbzone/Article/29685. Judging by the definition of the various caching strategies on that page, and the claim that JBossCache does not support read/write or nonstrict-read/write strategies, it would suggest that it only supports a read strategy.
This doesn't really make sense to me, as I don't see any point in having a transactional read-only cache, so I assume this is incorrect? The above post does seem to suggest that JBossCache does provide read/write caching. Can someone just confirm that please?
As an aside, I think this confusion might have originated from section 14.4.5 of the Hibernate manual (http://www.hibernate.org/hib_docs/reference/en/html/performance.html), which isn't particularly clear about what is and isn't provide. I guess the idea was perhaps to imply that by being transactional, JBossCache does implicitly provide read/write caching...
Anyway, any clarification much appreciated! -
3. Re: Jboss Cache and Hibernate Secondary Caching
brian.stansberry Jul 19, 2006 4:29 PM (in response to rknr55)Yep, it's a bit unclear :). The meaning there of "transactional" is "read/write + support of transactions". JBoss Cache is definitely a read/write cache.
-
4. Re: Jboss Cache and Hibernate Secondary Caching
jim_cross Jul 19, 2006 4:35 PM (in response to rknr55)Brilliant, thanks Brian!
-
5. Re: Jboss Cache and Hibernate Secondary Caching
ben.wang Jul 19, 2006 8:35 PM (in response to rknr55)The definition is actually from Hibernate's perspective. I remember Steve has explained to me briefly but it doesn't click now.
I will ask him if he can comment on this since many people would be interested. -
6. Re: Jboss Cache and Hibernate Secondary Caching
sebersole Jul 20, 2006 12:03 AM (in response to rknr55)Hence the reason I javadoc'ed most of this terminology :)
http://fisheye.jboss.com/viewrep/Hibernate/trunk/Hibernate3/src/org/hibernate/cache/CacheConcurrencyStrategy.java?r=9247
From our understanding, the problem with using JBoss Cache in conjunction with either a read-write or non-strict-read-write concurrency strategy is the need to interact with the cache during afterCompletion callbacks especially in the case of using JTA. Thus the supported concurrency strategies for use with JBossCache are read-only or transactional. -
7. Re: Jboss Cache and Hibernate Secondary Caching
brian.stansberry Jul 20, 2006 10:08 AM (in response to rknr55)Thanks, Steve -- that's very helpful :)