You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2006/07/10 07:35:32 UTC
[jira] Updated: (DBCP-5) [dbcp] PoolGuardConnectionWrapper violates
close() contract
[ http://issues.apache.org/jira/browse/DBCP-5?page=all ]
Phil Steitz updated DBCP-5:
---------------------------
Bugzilla Id: (was: 39069)
Fix Version: 1.3
> [dbcp] PoolGuardConnectionWrapper violates close() contract
> -----------------------------------------------------------
>
> Key: DBCP-5
> URL: http://issues.apache.org/jira/browse/DBCP-5
> Project: Commons Dbcp
> Type: Bug
> Environment: Operating System: All
> Platform: All
> Reporter: Derek Park
> Fix For: 1.3
>
> org.apache.commons.dbcp.PoolingDatasource.PoolGuardConnectionWrapper.close()
> violates the Connection.close() contract specified in the Java 1.5 API. The
> current API specifies that calling close() on an already-closed connection is a
> no-op. (Blame Sun for the bug. The API didn't used to say that.)
> PoolGuardConnectionWrapper.close() first calls checkOpen() which throws an
> exception if close() has already been called. Clearly that's not a no-op.
> The simplest fix is to change the first line in the close() method from this:
> checkOpen();
> to this:
> if (this.delegate == null) return;
> As of today (2006-03-22) this bug is in the latest SVN source (and has been in
> previous versions as well).
> DelegatingConnection and PoolingConnection don't seem (from a quick glance) to
> have this problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org