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

Tilmann Zäschke commented on JDO-735:
-------------------------------------

+1 for rolling back active transactions on close()

As I understand auto-closeable, it will rethrow the inner exception, i.e. the 
original exception that triggers the auto-close. Even if the close/rollback 
causes another exception, the original exception won't be lost. Should that not 
suffice?

 

> Make PersistenceManager and Query support AutoCloseable (JDK1.7+)
> -----------------------------------------------------------------
>
>                 Key: JDO-735
>                 URL: https://issues.apache.org/jira/browse/JDO-735
>             Project: JDO
>          Issue Type: New Feature
>          Components: api, specification, tck
>            Reporter: Andy Jefferson
>             Fix For: JDO 3.2
>
>
> So then it can be used with JDK1.7+ try-with-resources, as per 
> http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to