-->
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: Timeouts for whole sessions.
PostPosted: Thu Apr 14, 2005 3:15 am 
Newbie

Joined: Tue Apr 12, 2005 9:50 am
Posts: 13
Location: Karlsruhe, Germany
Hi,

I came around the following problem:
I have an application accessing data via Hibernate. Transactions might be long-running if the affected data is large (large queries, delete operations with many objects, ...). I would like to restrict Hibernate to allow just a limited time for such transactions.

I read a few threads about timeout-discussion and read about Query.setTimeout() and Query.cancel(), but they really solve just a part of the problem.

Query.setTimeout() acts just on a per-statement-base, i.e. each statement could run a defined period of time, but when my session does lots of statements (whil I really can not control, that a point of Hibernate), I can not control the timeout.

The main problem of using timeouts-per-query is, that they do not affect other hibernate-actions, such as create(), delete(), ...

I would appreciate having a feature in Hibernate, that allows to define a timeout per-session, i.e. a timeout could be defined for a session (and might even have a property-based default-value) such that after reaching the timeout, every still running db-action will be aborted, new queries will not be accepted and the call to hibernate (i.e. the current call on the session) will return.

What do others think about it?
Would someone else like to have this feature?
How difficult would this be to implement?

bye,
Stephan


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.