Query#setRange DataNucleus implementation currently reads in every single row and stores as strongly referenced objects, including all rows before the range on DB2. We see Out of Memory.
Actually, DB2 SQL does support range, long time ago. Just for the only purpose of Proof of Concept, adding this into .rdbms.adapter.DB2Adapter seems working:
public String getRangeByRowNumberColumn()
This fix is required: