Issue Details (XML | Word | Printable)

Key: DERBY-3247
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Daniel John Debrunner
Reporter: Daniel John Debrunner
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it

Created: 04/Dec/07 03:58 PM   Updated: 10/Jan/08 07:43 PM
Return to search
Component/s: JDBC
Affects Version/s: 10.3.1.4, 10.4.1.3
Fix Version/s: 10.3.3.0, 10.4.1.3

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works derby3247_diff.txt 2007-12-04 05:55 PM Daniel John Debrunner 2 kB

Resolution Date: 10/Jan/08 07:43 PM


 Description  « Hide
In a Java procedure called from SQL any dynamic ResultSets that are created using a PreparedStatement or CallableStatement leave their activations open until :
   - the statement that created it is garbage collected (which requires the outer statement to be garbage collected)
   - and the LCC processes unused Activations.

Dynamic ResultSets that are created by a Statement object are handled correctly because they are marked single use activation and thus the close of the ResultSet also closes the activation.

Fix is to mark the activation as single use in EmbedResultSet when the EmbedResultSet is marked as being a dynamic ResultSet. This will then lead to the close of the ResultSet also closing the activation.

Can't see how to write a test for this, I can see the activations stacking up in a debugger, but typically there will be no visible user impact.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #601386 Wed Dec 05 16:10:46 UTC 2007 djd DERBY-3247 Mark the activations for dynamic result sets as single use once they are returned to the applications JDBC statement. Ensures that the close of the ResultSet will close the activation.
Files Changed
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java

Repository Revision Date User Message
ASF #610895 Thu Jan 10 19:41:20 UTC 2008 djd DERBY-3247 Mark the activations for dynamic result sets as single use once they are returned to the applications JDBC statement. Ensures that the close of the ResultSet will close the activation.
Merge of Revision 601386 from trunk excluding the changes to EmbedStatement. Those changes were comments to the finalizer method which does not exist in 10.3
Files Changed
MODIFY /db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java