commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: svn commit: r882981 - in /commons/proper/dbcp/trunk: src/java/org/apache/commons/dbcp/ src/test/org/apache/commons/dbcp/ xdocs/
Date Sat, 21 Nov 2009 23:07:21 GMT
sebb wrote:
> On 21/11/2009, psteitz@apache.org <psteitz@apache.org> wrote:
>> Author: psteitz
>>  Date: Sat Nov 21 20:04:53 2009
>>  New Revision: 882981
>>
>>  URL: http://svn.apache.org/viewvc?rev=882981&view=rev
>>  Log:
>>  Made PoolingConnection pool CallableStatements.
>>  JIRA: DBCP-204
>>  Reported and patched by Wei Chen.
>>
>>  Added:
>>     commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableCallableStatement.java
  (with props)
> ...
> 
> ==============================================================================
>>  --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableCallableStatement.java
(added)
>>  +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableCallableStatement.java
Sat Nov 21 20:04:53 2009
> ...
>>  +public class PoolableCallableStatement extends DelegatingCallableStatement implements
CallableStatement {
>>  +
>>  +       /**
>>  +        * The {@link KeyedObjectPool} from which this CallableStatement was obtained.
>>  +        */
>>  +       protected KeyedObjectPool _pool = null;
>>  +
>>  +       /**
>>  +        * Key for this statement in the containing {@link KeyedObjectPool}.
>>  +        */
>>  +       protected Object _key = null;
> 
> As far as I can tell, both the above fields could be final, which
> would help with thread-safety.
> 
> Do they need to be protected? Or could they be private?

Good catch.  Yes, they both could and should be private and final.

Phil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message