You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Moandji Ezana (Created) (JIRA)" <ji...@apache.org> on 2012/02/11 15:39:59 UTC

[jira] [Created] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Make AsyncQueryRunner be a decorator around a QueryRunner
---------------------------------------------------------

                 Key: DBUTILS-88
                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
             Project: Commons DbUtils
          Issue Type: Task
            Reporter: Moandji Ezana
            Priority: Minor


AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "Moandji Ezana (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210115#comment-13210115 ] 

Moandji Ezana commented on DBUTILS-88:
--------------------------------------

Looks good to me. It might be worth marking the other constructors as @Deprecated, too. If AsyncQueryRunner is about wrapping a QueryRunner, AsyncQueryRunner(ExecutorService executorService, QueryRunner queryRunner) best expresses that.

Ultimately, it might be worth making QueryRunner an interface that is implemented by both AsyncQueryRunner and the current QueryRunner (renamed to BasicQueryRunner?).
                
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, DBUTILS-88v1.patch
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "Moandji Ezana (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237481#comment-13237481 ] 

Moandji Ezana edited comment on DBUTILS-88 at 3/24/12 8:53 AM:
---------------------------------------------------------------

Does anything need to happen for this issue and DBUTILS-87 to be committed?
                
      was (Author: mwanji):
    Does anything need to happen for this issue and DB-UTILS-87 to be committed?
                  
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, DBUTILS-88v1.patch, DBUTILS-88v2.patch
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "Moandji Ezana (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Moandji Ezana updated DBUTILS-88:
---------------------------------

    Attachment: DBUTILS-88v2.patch

DBUTILS-88v2.patch restores API compatibility by making AsyncQueryRunner extend AbstractQueryRunner again and undeletes the inner classes. It also adds deprecation warnings.
                
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, DBUTILS-88v1.patch, DBUTILS-88v2.patch
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "Moandji Ezana (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237481#comment-13237481 ] 

Moandji Ezana commented on DBUTILS-88:
--------------------------------------

Does anything need to happen for this issue and DB-UTILS-87 to be committed?
                
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, DBUTILS-88v1.patch, DBUTILS-88v2.patch
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "William R. Speirs (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William R. Speirs updated DBUTILS-88:
-------------------------------------

    Attachment: DBUTILS-88v1.patch

I took this patch one step further and removed the private methods in AsyncQueryRunner as they're not really needed. This also allowed me to remove extending AbstractQueryRunner.

However, this has API issues. Unfortunately, the inner classes in AsyncQueryRunner were marked as protected not private, so removing them changes the API. The same is true with removing extending AbstractQueryRunner.

For 1.5 we can always leave these classes and simply mark them as @Deprecated and then finally remove the extension of AbstractQueryRunner in v2.0.

Thoughts?
                
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, DBUTILS-88v1.patch
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "William R. Speirs (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William R. Speirs resolved DBUTILS-88.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5

Patch applied in r1305706
                
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, DBUTILS-88v1.patch, DBUTILS-88v2.patch
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simone Tripodi closed DBUTILS-88.
---------------------------------


1.5-RC released
                
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, DBUTILS-88v1.patch, DBUTILS-88v2.patch
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "William R. Speirs (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206255#comment-13206255 ] 

William R. Speirs edited comment on DBUTILS-88 at 2/11/12 8:34 PM:
-------------------------------------------------------------------

Note: The DBUTILS-88v1.patch includes changes to the unit tests which all pass now.
                
      was (Author: wspeirs):
    Note: The DBUTILS-99v1.patch includes changes to the unit tests which all pass now.
                  
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, DBUTILS-88v1.patch
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "William R. Speirs (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238335#comment-13238335 ] 

William R. Speirs commented on DBUTILS-88:
------------------------------------------

I'll take another look and commit the patch. However, I've had trouble in the past and I'm unable to release a new version of DBUtils. I'll see if I can get some help on that and get this done by the end of the week.
                
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, DBUTILS-88v1.patch, DBUTILS-88v2.patch
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "William R. Speirs (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239108#comment-13239108 ] 

William R. Speirs commented on DBUTILS-88:
------------------------------------------

Everything looked good so I committed your patch. I will try and get someone to release this version of DBUtils so we can start getting feedback from the community.
                
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, DBUTILS-88v1.patch, DBUTILS-88v2.patch
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "Moandji Ezana (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Moandji Ezana updated DBUTILS-88:
---------------------------------

    Attachment: AsyncQueryRunner_wraps_QueryRunner.txt

AsyncQueryRunner_wraps_QueryRunner.txt is a patch that demonstrates my idea. It does not update the tests, which currently fail.
                
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

Posted by "William R. Speirs (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206255#comment-13206255 ] 

William R. Speirs commented on DBUTILS-88:
------------------------------------------

Note: The DBUTILS-99v1.patch includes changes to the unit tests which all pass now.
                
> Make AsyncQueryRunner be a decorator around a QueryRunner
> ---------------------------------------------------------
>
>                 Key: DBUTILS-88
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-88
>             Project: Commons DbUtils
>          Issue Type: Task
>            Reporter: Moandji Ezana
>            Priority: Minor
>         Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, DBUTILS-88v1.patch
>
>
> AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be possible for AsyncQueryRunner to simply decorate a QueryRunner with async functionality, in the same way a BufferedInputStream might decorate an InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira