Yes, it is important for the caller to close the iterator.  I've added
comments to that effect.

On 2013-07-29 16:38, David Mason wrote:
> In zanata-war/src/main/java/org/zanata/dao/StreamingEntityIterator.java:
> 
>> +   {
>> +      this.session = session;
>> +   }
>> +
>> +   @Override
>> +   public void close()
>> +   {
>> +      if (srIter != null)
>> +      {
>> +         srIter.close();
>> +      }
>> +      session.close();
>> +   }
>> +
>> +   @Override
>> +   protected void finalize() throws Throwable
> 
> Fair enough.
> Since this overrides |Object.finalize()|, it is worth asking: will bad
> things happen if this takes a long time to be called, or is not called
> before the VM shuts down?
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/zanata/zanata-server/pull/78/files#r5443609>.
> 


-- 
Sean Flanigan

Senior Software Engineer
Engineering - Internationalisation
Red Hat