Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-24732

[GSS](7.4.z) HHH-13872 - Make the Java Stream close the underlying ScrollableResultsIterator upon calling a terminal operation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 7.3.10.GA
    • Hibernate, JPA/Hibernate
    • None
    • False
    • None
    • False

    Description

      The JPA 2.2 Query#getResultStream returns a Stream wrapping a Hibernate ScrollableResultsIterator.

      However, even if a terminal Stream operation is called, the underlying ScrollableResultsIterator will stay open until the Session is closed.

      More, the current implementation does not pass the closeHandler to the IntStream, LongStream, or DoubleStream when calling mapToInt or other methods that return a primitive stream.

      We need to create a StreamDecorator, IntStreamDecorator, LongStreamDecorator, and DoubleStreamDecorator that can both delegate the stream calls and close the stream upon executing a terminal operation.

      Attachments

        Issue Links

          Activity

            People

              sebersol Steven Ebersole
              rhn-support-toross Tom Ross
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: