[ https://issues.apache.org/jira/browse/JDO-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15618729#comment-15618729 ]
Craig L Russell commented on JDO-735: ------------------------------------- Now that PersistenceManager is done, we can resolve Extent and Query. These each can be used to create multiple objects that must be closed when they are no longer needed. Each has a closeAll() method to do so. But neither object is itself "open" and therefore "isClosed()" makes no sense. Proposal: Add "extends AutoCloseable" to Extent. Add javadoc to Extent that says that the close() method has identical semantics to closeAll(). Query already extends AutoCloseable (since April 2015). Add javadoc to Query that says that the close() method has identical semantics to closeAll(). The End. > 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 > Assignee: Michael Bouschen > Fix For: JDO 3.2 > > Attachments: CloseWithActiveTxRollsBack.java > > > 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)