Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 404729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:20:06+00:00 2026-05-12T17:20:06+00:00

I am running Spring + hibernate 3 + c3p0. Upon start up, if the

  • 0

I am running Spring + hibernate 3 + c3p0. Upon start up, if the database is down an exception is thrown after about 10 mins. Until then the program is blocked… I dont include spring xml, hibernate configuration etc, since it is a fairly common problem and if a solution exists it must be a standard straighforward way. If not i can trim the crucial code and configuration and paste it here. Does anybody know anything about it? Thanks in advance.


To clarify:

What I essentially need is to know if there is a wrapper in c3p0 or hibernate, or even spring, around the DriverManager.setLoginTimeout() function. Or a feature that offers me this functionality. The wrapper could be through a setting or something. I just want to get an exception if i havent connected to the datasource in X seconds, no matter the cause (socket, database, bad weather). And I want to find a place to set this X. To make things worse, Oracle driver , which is the driver i am using, does not implement setLoginTimeout() so I cant use it directly. I ve come to realize there is no way to solve it, but to manually spawn a timer thread of my own. Anybody can verify the above situation? Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:20:06+00:00Added an answer on May 12, 2026 at 5:20 pm

    It’s most likely not related to Hibernate / Spring per se; database connection pool is responsible for dealing with connections.

    1. What are your C3P0 settings?
    2. What database / driver are your using? Are there any driver-specific settings causing driver itself to wait / retry before reporting an error?
    3. Does “database down” mean “completely down”? Or could this be caused by some sort of socket timeout?

    Update (based on OP clarification below):

    DriverManager.setLoginTimeout() is not used by the oracle driver. OracleDataSource has its own loginTimeout setting instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running a Spring/Hibernate connecting to MySQL setup using c3p0 as my connection pool.
I have an extremely simple web application running in Tomcat using Spring 3.0.2, Hibernate
I'm using Spring and Hibernate with annotation-driven transactions. When running my application I've received
I have a java web app running under Spring 2.5.6, Hibernate 3.4 (with Hibernate
I have a java web app running in spring web flow framework and hibernate
running an application where i use the following: JBoss AS 6.1.0.Final Hibernate Spring Framework
I am using Hibernate JPA and Spring with a Mysql database and I want
We have a j2ee/spring/hibernate/tomcat web application already running on production. We are planning to
We're having the classic spring/hibernate/mysql stack running in Tomcat 5.5. Once in a while
Running JBoss 4.2.3.GA and trying to deploy a WAR that is using Spring/Hibernate/JPA. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.