Proposal: Automatic Resource Management

Bob Lee crazybob at
Wed Mar 4 00:16:39 PST 2009

On Tue, Mar 3, 2009 at 11:37 PM, Neal Gafter <neal at> wrote:

> Bob-
> java.sql.Connection has three methods (among others):
>  commit() - to cause the transaction to take effect
>  rollback() - to undo the transaction
>  close() - to close the connection
> Using the construct as you suggest closes the connection - not
> necessarily a good idea, and not the point of the example.  The point
> is to commit() when the controlled statement completes normally, and
> rollback() when it terminates abnormally, without the programmer
> having to add further boilerplate.  BGGA enables frameworks to provide
> an API that makes this as easy as if a purpose-built statement were
> available, but the present proposal appears to require boilerplate in
> each client.


Thanks for the tutorial. I've done quite a bit of JDBC and Java EE
programming in the past (, and I'm confident
that the Automatic Resource Management proposal suits my needs just fine.


More information about the coin-dev mailing list