-->
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: Timing out long queries with MySQL, C3P0, and Hibernate
PostPosted: Fri Sep 04, 2009 5:20 pm 
Newbie

Joined: Fri Sep 04, 2009 4:54 pm
Posts: 2
We are using Hibernate, C3P0, and MySQL to back an application that uses a Coherence cache. At times, long queries will cause Coherence to barf. In an ideal world, we would be able to configure something in the db layer to time out and throw an exception if a query was taking an exceptionally long time.

However, as I understand it from my research, that is not possible. I'm just looking for confirmation that I haven't overlooked anything. :)

My understanding is that neither Hibernate nor C3P0 provide a query-time function. JDBC's statement does provide a setQueryTimeout, but that is not exposed.

I could, potentially, configure MySQL to think these long queries are deadlocks by setting 'innodb_lock_wait_timeout', which would then cause them to throw an exception.

Does that sound about right? Anything I'm missing?

Thanks.

tj


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.