db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3457) Closing a logical connection must close all associated logical statements
Date Wed, 27 Feb 2008 17:15:51 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572987#action_12572987
] 

Kristian Waagan commented on DERBY-3457:
----------------------------------------

Thanks for the review Dyre!

I basically agree with you on the close failure issue, but I can't say I'm 100% sure. Unless
someone gives me pushback, I think I'll stick with the current approach (bailing out on first
exception thrown).

My last comment was rooted in the code comment that you also noticed.
I need to verify what is actually happening. I see a few scenarios:
 1) LogicalConnection actually closes the statements somehow, rendering the statement pooling
almost useless.
 2) LogicalConnection does not close statements at all, and I'll log a bug in JIRA.
    This would affect environments using connection pooling (CP, XA), but not statement pooling.

Solution to (1) *could* be to introduce a second close method, one that does not close the
statements (that would instead happen when you close the PooledConnection). The comment should
be removed.
For (2), a mechanism must be put into place and the comment can be removed. Maybe we can use
/ come up with a shared mechanism for LC and CLC, I don't know yet. Maybe even something in
am.Connection can be used, I know it keeps track of statements it creates.

I'll get back with more information later, hopefully tomorrow.

> Closing a logical connection must close all associated logical statements
> -------------------------------------------------------------------------
>
>                 Key: DERBY-3457
>                 URL: https://issues.apache.org/jira/browse/DERBY-3457
>             Project: Derby
>          Issue Type: Task
>          Components: JDBC, Network Client
>    Affects Versions: 10.4.0.0
>         Environment: Client-server with statement pooling enabled in the client driver.
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>             Fix For: 10.4.0.0
>
>         Attachments: derby-3457-1a-stmt_closing.diff, derby-3457-1a-stmt_closing.stat,
derby-3457-1b-stmt_closing.diff, derby-3457-1c-stmt_closing.diff, derby-3457-2a-stmt_registration.diff
>
>
> When a logical connection is closed, all open logical statements created by this connection
must be closed.
> The closing is important per the general principle of cleaning up resources, but especially
so in the case of statement pooling, as not closing the logical statement can cause side effects
on another logical connection (sharing the same physical connection).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message