Just a small note about your code Pierre-Yves:
You should NEVER let any exception propagate out of a
finally-block, because you effectively overwrite any useful information returned from the
try-block.
Let's say the
try-block returned successfully: Do we really want to overwrite that result just because the connection didn't close normally (presumably because it was already closed abnormally)? And if the
try-block threw an exception, isn't that exception much more interesting to know about than any exceptions that might occur in the
finally-block?