0 Replies Latest reply on Dec 3, 2003 10:49 AM by Simon Godden

    OutOfMemory when creating a large number of object instances

    Simon Godden Newbie

      I am trying to create 10000 random instances of an entity to do some volume testing.

      My code is very simple. I have a stateless session bean with a method to create an instance from a value object, and a JUnit test which loops round 10000 times using that session bean to create one.

      I get to about 25000 and then things start slowing down and eventually I get OutOfMemory.

      I've attached the two source files.

      Shouldn't I just be able to create as many as I want? What are the factors here?