-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Query cache and cache provider support
PostPosted: Tue Dec 30, 2003 4:44 pm 
Newbie

Joined: Mon Dec 08, 2003 2:21 pm
Posts: 10
Query cache was supported since Hibernate 2.1 beta 4. We are using SwarmCache for our clustered environment. From the Hibernate document section 12.2, it states that SwarmCache does not support the query cache, but others do.

so my question is: do I have to switch to JBoss TreeCache, for example, in order to use query caches in my application?

Thanks in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 4:49 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Well, from my understanding of logic, if you want A, and B does not support A but C does, you will have to take C ;)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 4:59 pm 
Newbie

Joined: Mon Dec 08, 2003 2:21 pm
Posts: 10
I understood the logic. I was wondering either it was a documentation error, or the query cache support does not depend on the underlying cache provider?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 6:59 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Not sure of me but I think that SwarmCache does not allow to clear a part (region) of the cache, so clearing the querycache would clear the object cache as well.
This breaks the Hibernate semantic, so using it as Query Cache is prohibitted

Yes, query cache is built on top of the underlying cache provider.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 7:06 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
I am not sure it does not, calling clear() on a SwarmCache should only clear this cache, and not the others, I think, I am not sure however, the api is not very clear on this, and I cant get the source, because SF is unavailable :) ... well watever, there will be a reason it is not supported :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 7:07 pm 
Newbie

Joined: Mon Dec 08, 2003 2:21 pm
Posts: 10
Thanks.

I saw previous posting from www.digijava.org stating that they have done implementation using SwarmCache together with QueryCache. I am just wondering if their suggestions have been made into Hibernate yet, or is there any plan to do so in the near future?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 7:24 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
gloeglm wrote:
I am not sure it does not, calling clear() on a SwarmCache should only clear this cache, and not the others, I think,

I checked the sources before answering :-)
clear and destroy do the same job (calling clearAll() api of swarmcache).

Using QueryCache and SwarmCache is doable but potentially inefficient.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 7:32 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Quote:
I checked the sources before answering :-)
clear and destroy do the same job (calling clearAll() api of swarmcache).

Okay, I believe you - this time ;)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 8:21 pm 
Newbie

Joined: Mon Dec 08, 2003 2:21 pm
Posts: 10
So I have to switch using TreeCache. Thanks.

From Hibernate doc, TreeCache only supports read-only and transactional concurrency strategy, it does not support nonstrict-read-write and read-write concurrency strategy. I believe there is some performance implication using transactional instead of nonstrict-read-write and read-write. Does anyone know how serious performance penalty is?

I would also like to have the ability of configuring different caches for different persistent objects, the same as in EHCache, does anyone know if TreeCache supports it?

TIA


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 31, 2003 6:49 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Actually, at the present time, I think the Hibernate docs are wrong and, in fact, the query cache does not work with *either* clustered cache.

The trouble is that SwarmCache is doing clustered eviction instead of clustered replication, and neither of them provide a cluster-safe timestamp.

So we need to get this figured out. (I am on this.)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 31, 2003 11:07 am 
Newbie

Joined: Mon Dec 08, 2003 2:21 pm
Posts: 10
gavin, thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 31, 2003 11:19 am 
Newbie

Joined: Mon Dec 08, 2003 2:21 pm
Posts: 10
one more question. How about Tangosol Coherence cache? does it support query cache?

TIA


Top
 Profile  
 
 Post subject: Any update on this issue?
PostPosted: Wed Jan 07, 2004 11:43 am 
Newbie

Joined: Wed Jan 07, 2004 11:34 am
Posts: 11
Location: London, UK
Having just been burnt by this issue with TreeCache (BTW the error was very confusing!) is there a timescale for a fix for this problem?

Cheers - Nick


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 08, 2004 3:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Quote:
How about Tangosol Coherence cache? does it support query cache?


Yes, you should be able to make a Coherance plugin that supports both usage="transactional" and the query cache. Tangosol does have a cluster time.

Quote:
Having just been burnt by this issue with TreeCache (BTW the error was very confusing!) is there a timescale for a fix for this problem?


We do not ever commit to timescales.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 01, 2004 12:22 pm 
Newbie

Joined: Thu Oct 09, 2003 1:53 pm
Posts: 4
gavin wrote:
Actually, at the present time, I think the Hibernate docs are wrong and, in fact, the query cache does not work with *either* clustered cache.


Gavin, Is this statement still true?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.