[jira] [Created] (DBUTILS-78) Add asynchronous batch, query, and update calls

classic Classic list List threaded Threaded
39 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
Add asynchronous batch, query, and update calls
-----------------------------------------------

                 Key: DBUTILS-78
                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
             Project: Commons DbUtils
          Issue Type: New Feature
            Reporter: William R. Speirs
            Priority: Minor
             Fix For: 1.4
         Attachments: AsyncQueryRunner.java

I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.

I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment: AsyncQueryRunner.java

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment: AsyncQueryRunner.java

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment:     (was: AsyncQueryRunner.java)

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment: AsyncQueryRunnerTest.java

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073197#comment-13073197 ]

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

I wrote unit tests for the AsyncQueryRunner code. I am getting 73% coverage over the AsyncQueryRunner class. The only things that are not covered are a few exceptions in a few places; however, all methods are covered.

I also replaced the version of my AsyncQueryRunner code after fixing numerous bugs I found while writing the unit tests.

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079807#comment-13079807 ]

Henri Yandell commented on DBUTILS-78:
--------------------------------------

Can you paste/attach your pom.xml modifications?

Presumably you've updated junit and introduced a version of mockito?

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment: pom.diff

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13081657#comment-13081657 ]

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

Any idea if/when this change will be integrated? Just looking for some feedback on the idea... Thanks!

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082140#comment-13082140 ]

Henri Yandell commented on DBUTILS-78:
--------------------------------------

Ack - I use iGoogle + RSS to notice when issues change. Apparently adding an attachment doesn't count. Sorry.

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082143#comment-13082143 ]

Henri Yandell commented on DBUTILS-78:
--------------------------------------

Patch applies; code compiles and tests pass.

Two main issues I see are:

1) Java 6 dependent (due to RunnableFuture). Currently DbUtils is 1.5. Given that 1.5 is EOL now, I don't think it's out of the question to move to Java 6.
2) Need some class documentation providing an example of how to use it. Alternatively update the examples.xml; but I think moving examples back to the classes and package.html might be more valuable for DbUtils. The class documentation should also explain what it is (currently same as QueryRunner) and when you'd use it instead of QueryRunner.

I recognize on the latter that this is asking more than QueryRunner has :)

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082349#comment-13082349 ]

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

1) Yea, we'll need Java 6 for the future stuff. Wasn't sure what the project's posture on that is.
2) Not a problem... documentation is key.

However, I don't think this patch should be accepted as-is :-) There is a LOT of duplicate code in my patch. I did this because I didn't want to mess with the QuerryRunner code if everyone thought my idea was stupid. However, there are a number of methods in the AsyncQuerryRunner are improved from the QuerryRunner (see DBUTILS-79).

I propose that we create a base or abstract class which both QuerryRunner and AsyncQuerryRunner extend. Thoughts?


> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Issue Comment Edited] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082349#comment-13082349 ]

William R. Speirs edited comment on DBUTILS-78 at 8/10/11 2:03 PM:
-------------------------------------------------------------------

1) Yea, we'll need Java 6 for the future stuff. Wasn't sure what the project's posture on that is.
2) Not a problem... documentation is key.

However, I don't think this patch should be accepted as-is :-) There is a LOT of duplicate code in my patch. I did this because I didn't want to mess with the QueryRunner code if everyone thought my idea was stupid. However, there are a number of methods in the AsyncQueryRunner are improved from the QueryRunner (see DBUTILS-79).

I propose that we create a base or abstract class which both QueryRunner and AsyncQueryRunner extend. Thoughts?


      was (Author: wspeirs):
    1) Yea, we'll need Java 6 for the future stuff. Wasn't sure what the project's posture on that is.
2) Not a problem... documentation is key.

However, I don't think this patch should be accepted as-is :-) There is a LOT of duplicate code in my patch. I did this because I didn't want to mess with the QuerryRunner code if everyone thought my idea was stupid. However, there are a number of methods in the AsyncQuerryRunner are improved from the QuerryRunner (see DBUTILS-79).

I propose that we create a base or abstract class which both QuerryRunner and AsyncQuerryRunner extend. Thoughts?

 

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13083924#comment-13083924 ]

Henri Yandell commented on DBUTILS-78:
--------------------------------------

I've moved DbUtils to Java6. People can comment if they feel that is too soon.

I've committed the patch - I agree that the classes should have a base class, but I think it'll be easier to do the other items (base class, documentation of example use and when you would use this) as subsequent patches.

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13083949#comment-13083949 ]

Simone Tripodi commented on DBUTILS-78:
---------------------------------------

Hen,
I agree on moving DBUtils to Java6: Java5 is no longer supported and in order to get as much as possible advantages - especially in the JDBC field - that move sounds more than reasonable.
As a side note: in MyBatis (formerly Apache iBATIS) we had to take the same choice in order to take advantage from JDBC4 APIs.

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13084129#comment-13084129 ]

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

While I'm refactoring this, is it OK to remove the deprecated methods in QueryRunner?

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment: async.diff

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, async.diff, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13084179#comment-13084179 ]

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

I attached another patch which does the following:
- Adds AbstractQueryRunner class
- Removes common methods from QueryRunner and AsyncQueryRunner, both now extend AbstractQueryRunner
- Updated the QueryRunner unit test to use Mockito; now with 74% code coverage (doesn't hit deprecated methods)


> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, async.diff, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment:     (was: async.diff)

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (DBUTILS-78) Add asynchronous batch, query, and update calls

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/DBUTILS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment: async.diff

Updated async.diff to include an update to the AsyncQueryRunner class and an example in the examples.xml file.

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>
>                 Key: DBUTILS-78
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-78
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: AsyncQueryRunner.java, AsyncQueryRunnerTest.java, async.diff, pom.diff
>
>
> I propose a new QueryRunner class, AsyncQueryRunner, which changes the return type of batch, query, and update methods. Instead of returning their respective return types, the methods would return a RunnableFuture. This would allow callers to either execute the RunnableFuture in a thread or via an CompletionService like the ExecutorCompletionService.
> I have attached a first cut at this class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
12