4 Replies Latest reply on Jun 20, 2004 6:39 PM by Joachim Van der Auwera

    on-load strategy limitations

    Joachim Van der Auwera Expert

      I have an EJB-QL query which returns a lot of records.

      If I execute this using the default config (on-load), I get a OutOfMemoryException. This sounds logical as JBoss is trying to load all my entity beans in memory/cache (I am using commit option A if that matters).

      Just using on-load and changing the page-size only changes the number of queries which are generated (sounds logical).

      The easy solution if to change the read-ahead strategy to on-find. However, this completely kills performance and suddenly causes related records to be (completely) loaded as well.

      The "none" strategy seems to be the best current option, eben if this generates separate SQL wueries to the the link field for external links.

      Would it not be possible to have some kind of variant of on-load/page-size which does not immediately load all results, but loads the data in chunks (which basically is what I thought on-load is supposed to do).

      Joachim