On 7/20/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:
On Jul 20, 2007, at 11:26 AM, Dain Sundstrom wrote:

> On Jul 19, 2007, at 11:19 PM, Phil Steitz wrote:
>
>> I would love to have a fix for DBCP-44; but that could wait on pool
>> 1.4 if necessary (and Ipersonally see no way to fix it just within
>> dbcp.  It would be great if I was wrong on that).
>
> I think the makeObject method is over synchronized.  Actually, the
> class doesn't look it's synchronized properly at all.  I'll take a
> shot at fixing this.

I attached a patch that fixes the synchronization in
PoolableConnectionFactory, but the deadlock still persists.  The
problem is GenericObjectPool.borrowObject() is synchronized so when
it needs to makeObject that method is called while the synchronized
block is held.  I think this would take major surgery to make
GenericObjectPool not perform this way.

Thats what I feared.  Thanks for looking in any case.

I think the way to solve this is to write a new pool implementation
that is much more async.  This easier with the Java5 concurrent
packages, but still quite tricky.

Yes, and at least for dbcp 1.3, I would prefer not to hop all the way
to 1.5 required JDK level.

I'll attempt to put together one
in a few days.  Regardless, I don't think this is something we should
target for this release.

Before writing another one, have a look at the compositepool package
in pool head.


-dain

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to