Skip site navigation (1) Skip section navigation (2)

Re: Exception-handling

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Roland Walter <roland(dot)walter(dot)rwa(at)gmx(dot)net>
Cc: Håkan Jacobsson <hakan(dot)jacobsson99(at)bredband(dot)net>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Exception-handling
Date: 2006-12-21 17:06:57
Message-ID: E2DEB0E0-33B1-4C2A-98CE-760BA406A3DB@fastcrypt.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
On 21-Dec-06, at 12:04 PM, Roland Walter wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dave Cramer wrote:
>> The only general rule I adhere to is to make sure you clean up your
>> connections in a finally clause
>>
>> Dave
>
> Depends of your application. I usually free up all resources in the
> finally clause, that I do not need any more. The resources are
> ResultSets and Statements and may be connections. Not closing the
> Statments and using the same connection further prooved to be fatal.

My point was to make sure you do your cleanup, whatever it may be in  
a finally clause. This is the most frequent cause of leaking resources.

Dave
>
> Regards,
> Roland.
>
> - --
> Dipl.-Phys. Roland Walter
> mailto: roland (dot) walter (dot) rwa (at) gmx (dot) net
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
>
> iD8DBQFFir6oxoOEAkary1ERAh1gAJ0XCLT7ildof8QbH/x6y+xrPy4xvACeLBwk
> vv9oqUJtZGFW/pYCtfLKDUk=
> =NoBO
> -----END PGP SIGNATURE-----
>


In response to

pgsql-jdbc by date

Next:From: janaka priyadarshanaDate: 2006-12-22 06:58:03
Subject: use connection pooling
Previous:From: Roland WalterDate: 2006-12-21 17:04:40
Subject: Re: Exception-handling

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group