I am able to accomplish that using ScrollableResults and ScrollMode.SCROLL_INSENSITIVE.. I would assume that query.list() in context of the SYS_REFCURSOR with a non-entity mapped through ResultTransformer would do something similar. Basically, what I am expecting here is to do a sqlQuery.list() on a query that returns a sys_RefCursor, assuming that the list is a proxy and progressively, hibernate will fetch records from the DB as I Iterate over the list. Even with periodic eviction, I keep getting OOM's.
Any suggestions?
Thanks..
|