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

  • Home
  • SEARCH
  • 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 8022223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:12:25+00:00 2026-06-04T22:12:25+00:00

When I set the login timeout on the data source, what does it do?

  • 0

When I set the login timeout on the data source, what does it do? Does it call DriverManager.setLoginTimeout() under the hood? Asking this because I’m curious as to whether it’s genuinely possible to set a per-data source login time out. Say if I have different DBMSs that I want to connect to, and these DBs have different responsiveness, so it’s reasonable to expect a different allowance for connection timeout, right?

If the answer is yes, then is there a good reason the DriverManager.setLoginTimeot() method is static?

  • 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-06-04T22:12:26+00:00Added an answer on June 4, 2026 at 10:12 pm

    This property should be per DataSource (although as far as I can see there is no explicit mention of this in the JDBC spec). The DataSource implementation of some drivers don’t even use DriverManager when creating connections.

    Be aware though that the value set on the DriverManager will need to be explicitly used by the driver, as DriverManager itself does nothing with the value (except store it). For example the PostgreSQL driver only uses the DriverManager value if no explicit timeout was configured in the JDBC url, Properties object or DataSource properties.

    The reason for DriverManager.setLoginTimeout() is that you do not control which Driver is actually being used by the DriverManager(*) so the only way to control it is through the DriverManager.

    (*) except of course by the drivers you added to the classpath (and in Java 5 or earlier: which you explicitly loaded).

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

Sidebar

Related Questions

The session state timeout is set using this web.config element <sessionState mode=InProc cookieless=false timeout=120
So, I have set up a login page that verifies the user's credentials, and
Hi guys I've set up an openID login system - just like the one
I have a login window with a Sign In button which is set as
I have a login page written in classic asp. I want to set the
Having derived this logic to bind dropdownlist to set of time intervals, I would
Dumb question.. what logic does the database use to determine the result set if
I need to set memebership timeout to be less than session timeout to avoid
In ASP.NET you can set the session timeout in several places: web.config: <authentication mode=Forms>
Can I change the session timeout dynamically? The timeout must be set according to

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.