[hibernate-users] DB Connection Timeout

J. Davison de St. Germain dav at sci.utah.edu
Tue Mar 6 14:13:00 EST 2007


Hi,

 I've searched the web and read through a lot of documentation, but I 
can't seem to find out how to do what I think should be a very simple 
task.  I want to specify how long hibernate will wait before it returns 
from a DB connection attempt.  I'm trying to test my code to ensure that 
it behaves correctly when the DB is down.  But testing takes forever 
because every time I run the code, it takes about a minute to timeout 
and throw the "no connection" exception.  I know there has to be a way 
(programmatically (and also via the config file)) to tell hibernate to 
only wait, say, 5 seconds before throwing the exception.  Any help you 
could provide me would be greatly appreciated.

         Sincerely,
                    Davison

-- 
-----------------------------------------------------------------------
- J. Davison de St. Germain         dav at cs.utah.edu    (801) 581-4078 -
- Chief Software Engineer           http://www.cs.utah.edu/~dav       -
- SCI Institute, SE C-SAFE          University of Utah                -
-----------------------------------------------------------------------





More information about the hibernate-users mailing list