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

Craig L Russell commented on JDO-735:
-------------------------------------

"In a non-managed environment, if the current transaction is active, close 
throws JDOUserException."

This could be interpreted as "the state of the current transaction and of the 
pm remains the same." 

I'd like to at least see "The transaction is rolled back and the 
PersistenceManager is closed."

Aside from backward compatibility, is there any need to keep the "throws 
JDOUserException"?

> 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