-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate concurrently executes the same query
PostPosted: Thu Nov 02, 2006 1:23 pm 
Newbie

Joined: Thu Nov 02, 2006 1:11 pm
Posts: 2
I'm using Hibernate 3, with EHCache 1.1.

I have a server running in JBoss, which relies on Hibernate for ORM and data querying.

My server serves requests from many client applications. In some instances they all ask from the same data.

I've enabled Hibernate to cache data using the combination of query cache and EHCache.

When my server sends a query to Hibernate it checks the cache. If there is no data for that query it lauches a postgresql (which is my database server) process to execute that query. What that is happening another client may want the same data; so Hibernate once again is asked to execute the same query. Since the query has no data yet Hibernate launches another postgresql to execute the query.

It seems to me that Hibernate does not detect what queries are being executed and would hold off the same (subsequent) queries such that these same queries are not executed concurrently.

Or I haven't used the right property(ies) to configure Hibernate.

Any help is appreciated.

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.