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

say more on PoolingDataSource.getLoginTimeout when throwing UnsupportedOperationException

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

    • Bugzilla Id:
      26062

      Description

      the javadoc for BasicDataSource.html#getLoginTimeout() doesn't say anything.
      Only when trying to run it, I get java.lang.UnsupportedOperationException
      at
      org.apache.commons.dbcp.PoolingDataSource.getLoginTimeout(PoolingDataSource.java:179)
      at
      org.apache.commons.dbcp.BasicDataSource.getLoginTimeout(BasicDataSource.java:542)
      ...

      Suggestion:

      Background:
      I am trying to gracefully do a "mysqlhotcopy" backup as per
      http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Backup
      and
      http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#mysqlhotcopy
      They lock tables for this and if accessed by another JDBC thread then, their
      JDBC just hangs.
      I would rather have it gracefully timeout after say 30 seconds since a backup
      may last several minutes depending upon the database size and I don't want my
      web-users to be frustrated this way.
      Therefore, I got to look into the login timeout. If there are better practices
      to handle this situation, it would be great to document this ! (e.g. also in
      http://bugs.mysql.com/bug.php?id=2264)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ralfhauser Ralf Hauser
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: