3 Replies Latest reply on Oct 9, 2003 3:55 AM by Frank Ulbricht

    OutOfMemory with finder method...

    Frank Ulbricht Newbie


      I have to export a large number of enitity beans into a file (about 10.000) by a list of ids (primary keys). So I use the "findByPrimaryKey" method for each id and write the properties of the returned entity bean into the file. After that I do not need this bean any longer (hope the GC will care).

      After exporting the half of these beans I get an "OutOfMemory" exception. I tried to do it in a single transaction or with a transaction for every single bean. The result is the same.

      Increasing the VMs heap size could solve the problem. But what if I have to export much more beans?

      Anyone any idea? Thanks in advance...