Re: [VOTE] Release of DbUtils 1.2 RC2

2009-03-17 Thread Liam Coughlin
I'd suggest marking it volatile or making it an immutable property. the overhead incurred from enforcing thread safety i think is a bit much for the specific purpose of the QueryRunner -- in all the instances that you mentioned -- it's the datasource that should be dispatched to threads not the qu

Re: [VOTE] Release of DbUtils 1.2 RC2

2009-03-15 Thread sebb
On 15/03/2009, Dan Fabulich wrote: > sebb wrote: > > > > OK, I'd not noticed that the class was usable without the DataSource. > > > > Of course the alternative is to document the class as thread-unsafe... > > > > I would guess that the reason we've never seen a bug filed on this issue is > that

Re: [VOTE] Release of DbUtils 1.2 RC2

2009-03-15 Thread Dan Fabulich
sebb wrote: OK, I'd not noticed that the class was usable without the DataSource. Of course the alternative is to document the class as thread-unsafe... I would guess that the reason we've never seen a bug filed on this issue is that nobody uses setDataSource after the class is created. For

Re: [VOTE] Release of DbUtils 1.2 RC2

2009-03-12 Thread Jörg Schaible
+1, all tests pass now also on IBM JDK 6. Dan Fabulich wrote: > > My second attempt at releasing a commons project; please be gentle. :-) > > RC2 includes sebb's patches that make numerous instance variables > immutable. > > NOTE: No one has yet explicitly said on-list that they have tested Db

Re: [VOTE] Release of DbUtils 1.2 RC2

2009-03-11 Thread sebb
On 11/03/2009, Dan Fabulich wrote: > sebb wrote: > > > > Sorry, my last e-mail mentioned that QueryRunner was not thread-safe, > > but I did not provide a patch. > > > > Dang; I skimmed through other classes looking for unsafe members but > overlooked your main point. > > > > Or you could change

Re: [VOTE] Release of DbUtils 1.2 RC2

2009-03-11 Thread Dan Fabulich
sebb wrote: Sorry, my last e-mail mentioned that QueryRunner was not thread-safe, but I did not provide a patch. Dang; I skimmed through other classes looking for unsafe members but overlooked your main point. Or you could change the API further and insist that the DataSource is provided a

Re: [VOTE] Release of DbUtils 1.2 RC2

2009-03-11 Thread sebb
Sorry, my last e-mail mentioned that QueryRunner was not thread-safe, but I did not provide a patch. The DataSource variable is protected. To allow multi-threaded access, either the variable has to be made volatile, or it has to be made private (i.e. an API change) and the accessors need to be sy

[VOTE] Release of DbUtils 1.2 RC2

2009-03-10 Thread Dan Fabulich
My second attempt at releasing a commons project; please be gentle. :-) RC2 includes sebb's patches that make numerous instance variables immutable. NOTE: No one has yet explicitly said on-list that they have tested DbUtils 1.2 RC1 or RC2 with a real database. We should not release it until