Apache JDO Project - [jira] Commented: (JDO-542) Adjusting Extent to Java 5.0

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > October 2007 > [jira] Commented: (JDO-542) Adjusting Extent to Java 5.0





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [jira] Commented: (JDO-542) Adjusting Extent to Java 5.0
Craig Russell (JIRA)

2007-10-13, 1:11 am


[ https://issues.apache.org/jira/brow...action_12534457 ]

Craig Russell commented on JDO-542:
-----------------------------------

This change seems non-controversial.

Here's what I'd propose for the close issue:

<proposed>
There is a potential issue in case an implicit iterator is acquired by use of the iterator in a "for" construct, and not iterated to completion. To avoid leaking resources, an iterator is automatically closed if it completes; and must not be strongly refe
renced by the implementation. This allows the underlying resources to be garbage collected if the iterator itself is garbage collected.
</proposed>



> Adjusting Extent to Java 5.0
> ----------------------------
>
> Key: JDO-542
> URL: https://issues.apache.org/jira/browse/JDO-542
> Project: JDO
> Issue Type: Improvement
> Components: api2, api2-legacy
> Reporter: Ilan Kirsh
>
> It might make sense to update Extent:
> public interface Extent<E> extends Iterable<E> {
> :
> :
> }
> and in PersistenceManager:
> Extent<T> getExtent (Class<T> cls, boolean subclasses);
> Extent<T> getExtent (Class<T> cls);
> This way, iteration over all the instances of a class could be simplified:
> for (Person person : pm.getExtent(Person.class))
> System.out.println(person.getName());


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com