Issue Details (XML | Word | Printable)

Key: DBCP-186
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Ralf Hauser
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Dbcp

say more on PoolingDataSource.getLoginTimeout when throwing UnsupportedOperationException

Created: 12/Jan/04 11:47 PM   Updated: 25/Mar/08 08:11 AM
Return to search
Component/s: None
Affects Version/s: 1.1
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Operating System: other
Platform: Other

Bugzilla Id: 26062


 Description  « Hide
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)



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
YoavShapira added a comment - 22/Aug/04 03:52 AM
JavaDoc for BasicDataSource and PoolingDataSource clarified, message added to
exception that's thrown.