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: [DBCP] Shutting down Derby and the Pool
Date Tue, 19 Jan 2010 19:51:38 GMT
Pawan Singh wrote:
> I am using PoolingDataSource. This data source does not seem to have a way of shutting
down.
> 

Assuming you are using a o.a.c.pool.impl.GenericObjectPool as the
backing pool, you can hold onto a reference to the pool and call the
close method of the pool.

Phil

> -Pawan
> 
> On Jan 18, 2010, at 9:44 AM, Phil Steitz wrote:
> 
>> Pawan Singh wrote:
>>> Hi
>>>
>>> I am using Apache Derby (embedded) and Apache DBCP to set up a nice pooling data
source. My question is how to close this pooling data source properly when the application
shuts down. If I am not using DBCP, I can make direct JDBC calls on the Derby data source
to shutdown the database - but I cannot figure out how to do this when the data source is
DBCP Pooled DataSource.
>>>
>>> The examples on the DBCP project page do not do any shutdown of the data source
at all.
>> Which DBCP datasource are you using?  If it is BasicDataSource, you
>> can use the close() method.
>>
>> Phil
>>
>>
>>> -Pawan
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
> 
> 
> ---------------------------------------------------------------------
> 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