db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-1104) Finalization of statements in client driver should handle sending of CLSQRY to close result sets on network server
Date Mon, 13 Mar 2006 21:39:39 GMT
Finalization of statements in client driver should handle sending of CLSQRY to close result
sets on network server

         Key: DERBY-1104
         URL: http://issues.apache.org/jira/browse/DERBY-1104
     Project: Derby
        Type: Sub-task
  Components: Network Client  
    Reporter: Deepa Remesh
    Priority: Minor

Currently, the finalizer in client driver's statement classes do only client-side cleanup.
Cleanup of statements and result sets on network server will happen only when the client driver
re-uses a section number for a new statement. DRDA has CLSQRY command which can be sent to
close the result sets on the server. This command has to be sent as part of statement finalization
so that result sets will get cleaned up immediately on the server without waiting for the
re-use to happen.

The code to send CLSQRY needs to be  synchronized. Hence it cannot be added directly to finalize
method. Dan pointed out that we should avoid any synchronized operation in the finalizer since
there is a potential to block the finalizer thread and potentially the JVM. Embedded driver
performs the cleanup actions outside the finalizer. See EmbedPreparedStatement.finalize. A
similar mechanism needs to be used in client driver.

The comments in DERBY-210 has more details, specifically the following comments:

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message