Uploaded image for project: 'Commons DBCP'
  1. Commons DBCP
  2. DBCP-218

basicDataSource.setLoginTimeout(n) not work?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1, 1.2, 1.2.1, 1.2.2
    • 1.3
    • None
    • Windows

    Description

      Hi:

      We tried to set the login timeout value of the basic data source but got the exception. Is this feature (Login timeout is not supported.)? We want the connection pool not to wait forever if the database is too busy. Any ideas? Thanks.

      In the code:
      BasicDataSource bds = new BasicDataSource();
      bds.setDriverClassName("oracle.jdbc.driver.OracleDriver");
      bds.setUsername("my username");
      bds.setPassword("my password");
      bds.setUrl("jdbc:oracle:thin:@mrhost:1521:test");
      bds.setMaxActive(2);
      bds.setLoginTimeout(5);

      Result:
      Exception in thread "main" java.lang.UnsupportedOperationException: Login timeout is not supported.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bliu Bill Liu
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: