On 2/20/06, Daniel John Debrunner <[EMAIL PROTECTED]> wrote: > 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. >
Thanks Dan. This is what I gathered so far from the reviews of patch4: 1. We need to send CLSQRY for all result sets of a statement when the statement is finalized. 2. Network messages (for which we need to wait for a reply) should not be sent from the finalizer. This will block the finalizer thread and potentially the JVM. In general, avoid any synchronized operation from finalizer. To be able to do 1 and 2, we require a mechanism similar to what is done by embedded driver for finalization. I have to work out some more details for this. Once done, I'll post it to the jira issue for review. In the meantime, if anyone has any other comments/suggestions, please let me know. Thanks, Deepa