Hi,
Yes, I've seen some things about C3P0... however it seems that you
should be able to do this without it... Also, the configuration item in
C3P0 doesn't seem to be what I want. From web searching I have found a
comment that says that hibernate.c3p0.timeout is for "maximum idle time
for a connection"... I don't quite know what that means... I'm not
concerned with the connection sitting idle... I'm concerned with it not
connecting in the first place.
Thanks again for your input. Hopefully others will have other
suggestions as well.
Sincerely,
Davison
Robert Klemme wrote:
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(a)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(a)cs.utah.edu (801) 581-4078 -
- Chief Software Engineer
http://www.cs.utah.edu/~dav -
- SCI Institute, SE C-SAFE University of Utah -
-----------------------------------------------------------------------