You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <de...@db.apache.org> on 2006/04/20 19:12:05 UTC

[jira] Created: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Move isPoolable() and setPoolable() from PreparedStatement to Statement
-----------------------------------------------------------------------

         Key: DERBY-1235
         URL: http://issues.apache.org/jira/browse/DERBY-1235
     Project: Derby
        Type: Improvement

  Components: JDBC  
    Versions: 10.2.0.0    
    Reporter: Rick Hillegas
     Fix For: 10.2.0.0


An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1235?page=all ]

Dyre Tjeldvoll updated DERBY-1235:
----------------------------------

    Derby Info:   (was: [Patch Available])

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derby-1235.v2.diff, derby-1235.v2.stat, derbyall_report.v1.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1235?page=all ]

Dyre Tjeldvoll reassigned DERBY-1235:
-------------------------------------

    Assign To: Dyre Tjeldvoll

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0

>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Kristian Waagan (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1235?page=all ]

Kristian Waagan updated DERBY-1235:
-----------------------------------

    Derby Info: [Patch Available]

My comments have all beed addressed, and I think the patch (' derby-1235.v2.diff') looks solid and is ready for commit. I also set the "Patch Available" field.

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derby-1235.v2.diff, derby-1235.v2.stat, derbyall_report.v1.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1235?page=all ]

Dyre Tjeldvoll updated DERBY-1235:
----------------------------------

    Attachment: derby-1235.v1.diff
                derby-1235.v1.stat
                derbyall_report.v1.txt

Attaching patch (v1) that moves isPoolable, isPoolable() and setPoolable from EmbedPreparedStatement to EmbedStatement.

Ran derbyall and jdbc4 successfully. Please review.

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derbyall_report.v1.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1235?page=all ]

Dyre Tjeldvoll updated DERBY-1235:
----------------------------------

    Derby Info: [Patch Available]

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derby-1235.v2.diff, derby-1235.v2.stat, derby-1235.v3.diff, derby-1235.v3.stat, derbyall_report.v1.txt, derbyall_report.v3.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1235?page=comments#action_12376431 ] 

Dyre Tjeldvoll commented on DERBY-1235:
---------------------------------------

Hi Kristian, thanks for your comments :)

Good catch(es). I (or rather my grep) completely missed the client side. 

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derbyall_report.v1.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1235?page=comments#action_12376674 ] 

Knut Anders Hatlen commented on DERBY-1235:
-------------------------------------------

Hi Dyre, I see this diff in the jdbc40 suite (DerbyNetClient):

********* Diff file jdbc40/DerbyNetClient/jdbc40/TestPreparedStatementMethods.diff
*** Start: TestPreparedStatementMethods jdk1.6.0-beta2 DerbyNetClient jdbc40:jdbc40 2006-04-26 18:45:10 ***
0 add
> Expected a poolable statement
Test Failed.
*** End:   TestPreparedStatementMethods jdk1.6.0-beta2 DerbyNetClient jdbc40:jdbc40 2006-04-26 18:45:19 ***

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derby-1235.v2.diff, derby-1235.v2.stat, derbyall_report.v1.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1235?page=all ]

Dyre Tjeldvoll updated DERBY-1235:
----------------------------------

    Attachment: derby-1235.v3.diff
                derby-1235.v3.stat
                derbyall_report.v3.txt

The failure seen by Knut Anders was caused by not initializing the isPoolable variable in one of the PreparedStatement constructors on the client side. Since then, I have also learned that BrokeredXXXStatements40 need to implement (override) the xPoolable methods.

I'm attaching a third patch (v3) that addresses the above issues, and also adds a new junit-test to test these methods for BrokeredXXXStatements (jdbc4/XA40Tests.java).

Ran derbyall and jdbc4 in embedded and DerbyNetClient successfully.

Please review.

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derby-1235.v2.diff, derby-1235.v2.stat, derby-1235.v3.diff, derby-1235.v3.stat, derbyall_report.v1.txt, derbyall_report.v3.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1235?page=all ]

Dyre Tjeldvoll updated DERBY-1235:
----------------------------------

    Derby Info: [Patch Available]

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derbyall_report.v1.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1235?page=all ]

Dyre Tjeldvoll updated DERBY-1235:
----------------------------------

    Attachment: derby-1235.v2.diff
                derby-1235.v2.stat

Attaching a new patch based on Kristian's very valuable review comments. The new patch
- Replaces references to PreparedStatement with Statement in Javadoc comments.
- Makes the same change for the Network client.
- Changes the default value for isPoolable to false for Statement, while keeping true as the default for PreparedStatement (isPoolable was made protected so that it can be modified by derived classes). Since CallableStatement inherits from PreparedStatement, it too will be poolable by default.
- Added a test case to StatementTest.java to test isPoolable(), setPoolable() and the default value for Statement.
- TestPreparedStatement.java already tests this for PreparedStatements (including the correct default).

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derby-1235.v2.diff, derby-1235.v2.stat, derbyall_report.v1.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Kristian Waagan (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1235?page=comments#action_12376427 ] 

Kristian Waagan commented on DERBY-1235:
----------------------------------------

Hi Dyre. Thanks for the patch. I had a look at it, and have the following comments:

1) The JavaDoc states isPoolable should be false by default for Statement, and true for PreparedStatement and CallableStatement. In the patch, the default for Statement is set to true. I don't know if the other criterias are met.
2) The JavaDoc/comments for Statement still use "PreparedStatement".
3) Tests should be added for Statement (jdbc4/StatementTest.java), and we might want to keep/add tests for PreparedStatement and CallableStatement as well. The tests can be added after the client side patch is ready. There should be a test for default value.

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derbyall_report.v1.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1235?page=comments#action_12376481 ] 

Dyre Tjeldvoll commented on DERBY-1235:
---------------------------------------

I forgot to say that my last comment is about the v2 patch (should be obvious), 
that I did not run derbyall again, but that jdbc4 passes, 
and that the patch removes an additional isPooled member variable in client/am/PreparedStatement40.java
(on trunk there is an isPooled member variable in client/am/PreparedStatement40.java and client/am/PreparedStatement.java)

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derby-1235.v2.diff, derby-1235.v2.stat, derbyall_report.v1.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1235?page=all ]
     
Dyre Tjeldvoll closed DERBY-1235:
---------------------------------


> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derby-1235.v2.diff, derby-1235.v2.stat, derby-1235.v3.diff, derby-1235.v3.stat, derbyall_report.v1.txt, derbyall_report.v3.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1235?page=all ]

Dyre Tjeldvoll updated DERBY-1235:
----------------------------------

    Derby Info:   (was: [Patch Available])

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derbyall_report.v1.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-1235) Move isPoolable() and setPoolable() from PreparedStatement to Statement

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1235?page=all ]
     
Knut Anders Hatlen resolved DERBY-1235:
---------------------------------------

    Resolution: Fixed

Committed revision 398940.

> Move isPoolable() and setPoolable() from PreparedStatement to Statement
> -----------------------------------------------------------------------
>
>          Key: DERBY-1235
>          URL: http://issues.apache.org/jira/browse/DERBY-1235
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Rick Hillegas
>     Assignee: Dyre Tjeldvoll
>      Fix For: 10.2.0.0
>  Attachments: derby-1235.v1.diff, derby-1235.v1.stat, derby-1235.v2.diff, derby-1235.v2.stat, derby-1235.v3.diff, derby-1235.v3.stat, derbyall_report.v1.txt, derbyall_report.v3.txt
>
> An upcoming release of jdk1.6 will move isPoolable() and setPoolable() from PreparedStatement to Statement. We should conform.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira