commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <>
Subject Re: [pool] time to cut 2.3
Date Sat, 27 Sep 2014 16:46:01 GMT
Hi and thanks for chiming in.

The best path is to use Jira so we can all look and discuss. 


-------- Original message --------
From: Jacopo Cappellato
Date:09/27/2014 12:36 (GMT-05:00)
To: Commons Developers List
Subject: Re: [pool] time to cut 2.3

Hi Gary, all,

I am sorry if I jump in in this conversation: I am a committer of another ASF project (I am
actually the PMC chairman for Apache OFBiz) and my project is using dbcp2/pool2, so thank
you for all the work you did and are doing.
I am reviewing the code in DefaultPooledObject and Gary is definitely right: the code is not
thread safe; well, actually there is other code in the class that is not thread safe: the
"state" field is properly accessed in a thread safe way but all the other fields are not.
It is not enough to set them volatile because the class has some invariants that include more
than one field.
Gary has mentioned one but for example also getLastUsedTime() doesn't seem thread safe.
As a side note, I also see room for a couple of minor code simplifications. Would you like
me to send you a patch with some possible improvements?



On Sep 27, 2014, at 3:04 PM, Gary Gregory <> wrote:

> In org.apache.commons.pool2.impl.DefaultPooledObject.getActiveTimeMillis(),
> I see:
>        // Take copies to avoid threading issues
>        long rTime = lastReturnTime;
>        long bTime = lastBorrowTime;
> But isn't is the case that the object could be returned and borrowed again
> between the two lines? Unlikely but possible?
> Gary
> On Sun, Aug 31, 2014 at 11:09 PM, Phil Steitz <> wrote:
>> We have fixed a few bugs and made some enhancements since 2.2 and I
>> think we should cut 2.3.  I will volunteer to RM.  I will start
>> rolling RCs from trunk around the end of this week.  I don't see any
>> of the current open bugs against 2.x as blockers.  I may implement
>> the request in POOL-272 (or gladly accept a patch), but I think this
>> can wait for 2.4.  Patches, beautification, late-breaking bugs
>> welcome.
>> Phil
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> -- 
> E-Mail: |
> Java Persistence with Hibernate, Second Edition
> <>
> JUnit in Action, Second Edition <>
> Spring Batch in Action <>
> Blog:
> Home:
> Tweet!

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message