db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: [jira] Commented: (DERBY-210) Network Server will leak prepared statements if not explicitly closed by the user until the connection is closed
Date Mon, 20 Feb 2006 22:06:46 GMT
Deepa Remesh wrote:

> 
> Bryan, thanks for bringing this up. Please see if the following is okay:
> 
> If we add back CLSQRY to the finalize call, we need to have
> synchronization around the code where we send CLSQRY to network server
> and read server's reply. This synchronization is to ensure we wait for
> the correct reply. It does not change the state of any objects, So I
> think it is okay for it to be there in the finalizer. If anyone has
> other opinions, please share your thoughts.

Waiting in the finalizer for a server response doesn't seem like a great
idea to me. The worst case is the server is down or slow and we block
there for a significant portion of time. Even in the best case of a fast
response the finalizer is still blocking the finalizer thread,
potentially stalling the JVM.

Dan.


Mime
View raw message