[
https://issues.apache.org/jira/browse/DERBY-3446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571374#action_12571374
]
Knut Anders Hatlen commented on DERBY-3446:
-------------------------------------------
Regarding gc, we don't do any clean-up in the logical statement's finalizer,
and the only resource the logical statement holds on to is the physical
statement. This means that the reference from the physical statement which
could keep the logical statement alive a while longer, only affects the
lifetime of the physical statement. So it's kind of a self reference, and once
all other references to the physical statement are gone, it can be gc'ed
(except when the logical statement is still open and referenced, but that's not
changed with this patch). If it turns out to be a problem, it can probably be
fixed easily with a weak reference.
If the user remembers to close the logical statement there will definitely not
be any problem at all, since you reset the reference in LSE.close().
> Make ResultSet.getStatemet return the correct statement when created by a
> logical statement
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-3446
> URL: https://issues.apache.org/jira/browse/DERBY-3446
> Project: Derby
> Issue Type: Task
> Components: JDBC, Network Client
> Affects Versions: 10.4.0.0
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Priority: Minor
> Fix For: 10.4.0.0
>
> Attachments: derby-3446-1a_rs_getstatement.diff,
> derby-3446-1a_rs_getstatement.stat,
> derby-3446-2a_rs_getstatement_alternative.diff,
> derby-3446-2a_rs_getstatement_alternative.stat,
> derby-3446-2b_rs_getstatement_alternative.diff
>
>
> ResultSet.getStatement must return the correct statement, that is the
> statement that created the result set.
> It is particularly important for result set created by logical statements, as
> leaking of physical statements can cause all kinds of side effects in a
> connection pooling environment.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.