db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3446) Make ResultSet.getStatemet return the correct statement when created by a logical statement
Date Fri, 22 Feb 2008 11:54:21 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571365#action_12571365

Knut Anders Hatlen commented on DERBY-3446:

Patch 2a is exactly what I was thinking, except I assumed LogicalStatementEntity that was
implementing Statement. Since all sub-classes of LogicalStatementEntity are implementing Statement,
and LogicalStatementEntity is an abstract class (actually, it's not declared as abstract,
but in reality it is used as an abstract class I think), either of these approaches should
work and make the code even simpler:

  a) Declare LogicalStatementEntity as an abstract class than implements java.sql.Statement,
and move calls to setOwner() from the sub-classes' constructors into LSE's constructor.

  b) Remove calls to setOwner() from the sub-classes, and do this in LSE's constructor: physicalPS.setOwner((java.sql.Statement)

I think I prefer (a) since these two approaches are essentially identical, only (a) makes
the assumptions verifiable at compile time.

> 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:
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For:
>         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
> 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.

View raw message