[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ojb-user
Subject:    Re: DBCP, Oracle9i Blob/Clob broken
From:       Danilo Tommasina <dtommasina () risksys ! com>
Date:       2005-03-31 8:39:18
Message-ID: 424BB736.2040309 () risksys ! com
[Download RAW message or body]

Hi Martin,

we just upgraded to OJB 1.0.2, the fixes in Oracle9i platform work like a charm
many, many thanks again for the great work to everybody that contributed.

bye
danilo

> Nice work,
> 
> many thanks.
> 
> cheers
> danilo
> 
> 
>> Danilo Tommasina wrote:
>>
>>> I ended up implementing a custom DBCP connection factory that is 
>>> using a BasicDataSource instead of a PooledDataSource. Since the 
>>> documentation of the DBCP stuff is really ugly I didn't find out what 
>>> the difference really is between the PooledDataSource and the 
>>> BasicDataSource. Fact is that with the BasicDataSource based 
>>> implementation the problem with the MAX_OPEN_CURSORS is solved, 
>>> because a fixed-size PreparedStatement cache is used.
>>
>>
>>
>> I had a look in DBCP CVS and the BasicDataSource is really only a 
>> specialiced implementation of PooledDataSource with more user-friendly 
>> getter/setters. It will use AbandonedObjectPool or GenericObjectPool 
>> for connection "storage".
>>
>> With PooledDataSource you can choose any underlying pool you want and 
>> just supply a factory that could eg return your own pool 
>> implementations. (But you have no "nice" setter like setMaxIdle, since 
>> you can't rely on any specifics on the object pool.)
>>
>> I think it makes sence to keep PooledDataSource in OJB, which enables 
>> the configuration to be more generic in OJB1.1.
>>
>> However, I was able to work around the MAX_OPEN_CURSORS error by 
>> adding a check in the default DBCP connection factory: if platform is 
>> Oracle9i then don't use DBCP PreparedStatement caching. After fixing 
>> so that the factory calls initializeJdbcConnection properly, this 
>> allows the Oracle9i platform impl to manage the statement caching.
>>
>>> Note that it is necessary to implement/override also the 
>>> releaseAllResources() method for closing the pooled connections on 
>>> application shutdown.
>>
>>
>>
>> This is now fixed in the DBCP factory in CVS.
>>
>> These changes are only in OJB_1_0_RELEASE branch yet, I will now merge 
>> them with head.
>>
>> Regards,
>>  Martin
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic