-->
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.  [ 2 posts ] 
Author Message
 Post subject: Interrompre une requete
PostPosted: Mon Aug 18, 2008 12:49 pm 
Newbie

Joined: Mon Aug 18, 2008 12:43 pm
Posts: 1
Bonjour à tous,

j'utilise Hibernate 3.2.6 et je voudrai savoir comment peut-on interrompre une requete qui prendrait trop de temps (sur action de l'utilisateur) ?

Est-ce que le fait de:
- lancer la requete (avec un query.list) dans un thread et
- tuer violemment le thread (même si les méthodes stop ou interrupt sont deprecated)
va tuer la requete "native"?

Merci à tous


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 12, 2008 8:07 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
Non.
La seule manière de faire correcte est de mettre un timeout sur la transaction. Pour ce faire, tu as besoin du support d'un transaction manager qui supporte cette fonction...

Tuer la thread comme tu proposes n'aura d'effet que du côté serveur Java - la requête continuera probablement de s'exécuter sur la DB...

_________________
If you found my post helpful, please rate it! Thanks


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

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.