db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dag.wan...@oracle.com (Dag H. Wanvik)
Subject Re: Java 7 try-with-resources (AutoClosable) on Derby connections with auto-commit off
Date Fri, 03 Aug 2012 12:57:01 GMT
Kristian Waagan <kristian.waagan@oracle.com> writes:

> Hello,
>
> Has anyone considered the case of using try-with-resources (Java SE 7)
> with Derby connections with auto-commit off?

Presumably, this would happen only if the app code received an
*statement level SQLException* which isn't caught (with retry or
rollback), leading to an (auto)close.  If the SQLException is
transaction or connection level error, the auto-close wouldn't throw. I
agree it seems to defeat the purpose somewhat..


Mime
View raw message