commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <>
Subject [jira] [Commented] (DBUTILS-78) Add asynchronous batch, query, and update calls
Date Tue, 16 Aug 2011 05:52:27 GMT


Henri Yandell commented on DBUTILS-78:

Adding abstract looks good.

Presumably "public int update(Connection conn, boolean closeConn, String sql, Object... params)"
was meant to be private?

I think the example should assume the use case that there are two separate pieces of code.
That is, the take().get() call should be in a separate block. That will also make the exception
handling clearer for the second block.

The new parameter protection code looks ok (DBUTILS-79). There's an odd bit where you call
close(conn) after identifying conn was null. 

I've applied all the changes (r1158107, r1158109, r1158110). Let me know your thoughts on
the above.

> Add asynchronous batch, query, and update calls
> -----------------------------------------------
>                 Key: DBUTILS-78
>                 URL:
>             Project: Commons DbUtils
>          Issue Type: New Feature
>            Reporter: William R. Speirs
>            Priority: Minor
>             Fix For: 1.4
>         Attachments:,, 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:


View raw message