commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Tonhofer, m-plify S.A." <d.tonho...@m-plify.com>
Subject RE: [dbcp] using pooling in standalone applications
Date Wed, 22 Dec 2004 09:40:32 GMT
Canon:

<http://java.sun.com/docs/books/vmspec/2nd-edition/html/Concepts.doc.html#19152>

--On Monday, December 20, 2004 11:34 AM -0500 "Botelho, Mauro" <Mauro.Botelho@turner.com>
wrote:

> I'm not sure if the garbage collector is run when the JVM is shutting down. According
to the javadoc, finalize() is called by the GC.
>
> Mauro
>
> -----Original Message-----
> From: Wade Chandler [mailto:wchandler@redesetgrow.com]
> Sent: Monday, December 20, 2004 11:10 AM
> To: Jakarta Commons Users List
> Subject: Re: [dbcp] using pooling in standalone applications
>
>
> Botelho, Mauro wrote:
>> The object pool you pass either to the constructor or the setPool method should have
a close() method.
>>
>> Mauro
>>
>> -----Original Message-----
>> From: Henk Schets [mailto:henk.schets@kmi-irm.be]
>> Sent: Monday, December 20, 2004 9:38 AM
>> To: Jakarta Commons Users List
>> Subject: RE: [dbcp] using pooling in standalone applications
>>
>>
>> I am using the poolingdatasource because I want pooling.
>> Everything is closed, but since it is pooled, the close is not done.
>> But in fact I want it to actually close when the program exits.
>>
>> Henk
>>
>> On Mon, 2004-12-20 at 15:28, Botelho, Mauro wrote:
>>
>>> If you are using BasicDataSource, all you need to do is call the close method.
>>>
>>> Mauro
>>>
>>> -----Original Message-----
>>> From: David Tonhofer, m-plify S.A. [mailto:d.tonhofer@m-plify.com]
>>> Sent: Monday, December 20, 2004 9:15 AM
>>> To: Jakarta Commons Users List
>>> Subject: Re: [dbcp] using pooling in standalone applications
>>>
>>>
>>> Probably by adding a shutdown hook using java.lang.Runtime.addShutdownHook().
>>> The hook will have to loop over all the open Connections registered in
>>> Jakarta Pooling and close() them. The problem is, how does it find those
>>> Connections?
>>>
>>> --On Monday, December 20, 2004 11:56 AM +0100 Henk Schets <henk.schets@kmi-irm.be>
wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>> I am using dbcp pooling connections in a standalone application.  It
>>>> works nicely but there is one thing : when the application closes (and
>>>> the jvm too), the connection is not being closed nicely.   Is this
>>>> normal behaviour ?  What can I do to correct this ?
>>>>
>>>> Thanks,
>>>>
>>>> Henk
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> -- David Tonhofer
>>>
>>>   M-PLIFY S.A.
>>>   Resp. Informatique
>>>   47, av. de la Liberté
>>>   L-1931 Luxembourg
>>>   Tel: +352 261846-52
>>>   Fax: +352 261846-46
>>>   Mob: +352 021-139031
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
> I haven't looked in the code to verify, but will close be called on
> finalize of the pool object?
>
> Wade
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>
>



-- David Tonhofer

   M-PLIFY S.A.
   Resp. Informatique
   47, av. de la Liberté
   L-1931 Luxembourg
   Tel: +352 261846-52
   Fax: +352 261846-46
   Mob: +352 021-139031



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


Mime
View raw message