[hibernate-users] DB Connection Timeout

Robert Klemme shortcutter at googlemail.com
Tue Mar 6 14:50:41 EST 2007


I'd check connection pool settings.  Timeout is likely found there.
Hibernate usually uses C3P0.

Kind regards

robert

2007/3/6, J. Davison de St. Germain <dav at sci.utah.edu>:
> 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                -
> -----------------------------------------------------------------------
>
>
> _______________________________________________
> hibernate-users mailing list
> hibernate-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-users
>


-- 
Have a look: http://www.flickr.com/photos/fussel-foto/



More information about the hibernate-users mailing list