You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Henk Schets <he...@kmi-irm.be> on 2004/12/20 11:56:44 UTC

[dbcp] using pooling in standalone applications

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


Re: [dbcp] using pooling in standalone applications

Posted by "David Tonhofer, m-plify S.A." <d....@m-plify.com>.
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 <he...@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