0 Replies Latest reply on Feb 9, 2006 5:56 PM by bulloncito

    Huge Entities

    bulloncito

      Hi.

      I've the following problem, I'm trying to store files on a database, the bean already works, also added a custom wrapper to upload large files (More than oreilly's 1MB), have created a custom wrapper for wich the limit size is set on web.xml by tweaking a couple of classes (I'll post the code if anybody wants to use it), the problem is that very big entities finish up with java Heap memory (OutOfMemoryException), so I would like to set those fields to transient or something like that, while keeping them inside the container, since working them directly through jdbc would be anti-pattern.

      Any ideas ?

      I haven't been able to find some anotation that would do the trick, like a lazy initialization of the property, or some prepassivate/postactivate events on a session-like fashion so this large properties are not serialised and written to disk.

      --------------------
      jBoss 4.0.3SP1
      PostgreSQL 8
      Hibernate 3.1
      Debian/Xeon Dual