HHH-17826 ResultSet closed while scrolling results
This commit is contained in:
parent
27a9ec209e
commit
239014db35
|
@ -128,6 +128,7 @@ public class ScrollableResultsImpl<R> extends AbstractScrollableResults<R> {
|
||||||
final LoadContexts loadContexts = persistenceContext.getLoadContexts();
|
final LoadContexts loadContexts = persistenceContext.getLoadContexts();
|
||||||
loadContexts.register( getJdbcValuesSourceProcessingState() );
|
loadContexts.register( getJdbcValuesSourceProcessingState() );
|
||||||
persistenceContext.beforeLoad();
|
persistenceContext.beforeLoad();
|
||||||
|
try {
|
||||||
try {
|
try {
|
||||||
currentRow = getRowReader().readRow( getRowProcessingState(), getProcessingOptions() );
|
currentRow = getRowReader().readRow( getRowProcessingState(), getProcessingOptions() );
|
||||||
|
|
||||||
|
@ -136,9 +137,12 @@ public class ScrollableResultsImpl<R> extends AbstractScrollableResults<R> {
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
persistenceContext.afterLoad();
|
persistenceContext.afterLoad();
|
||||||
loadContexts.deregister( getJdbcValuesSourceProcessingState() );
|
|
||||||
}
|
}
|
||||||
persistenceContext.initializeNonLazyCollections();
|
persistenceContext.initializeNonLazyCollections();
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
loadContexts.deregister( getJdbcValuesSourceProcessingState() );
|
||||||
|
}
|
||||||
|
|
||||||
afterScrollOperation();
|
afterScrollOperation();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue