0 Replies Latest reply on Jan 13, 2005 12:35 PM by Gennady Evstratov

    OutOfMemory error on multiple calls of one SlSB form another

    Gennady Evstratov Newbie

      I've got the following problem:

      I've got 2 Stateless Session Beans. One of them calls other's method for several (about 10, actually) times. On the fifth or sixth call jboss starts to use something like 35-40 megabytes of memory for call marshalling, and finally application crashes with java.lang.OutOfMemory.

      What can be done to avoid such an aggressive memory consumption?

      code is something like the following:

       .... we are in method of SLSB A....
      
      bSession = BSessionLocator.locate();
      Set somethings = new HashSet();
      
      for(....){
       Object something = Session.getSomething( ...some params... );
       somethings.add(something);
      }
      
      .... some other code...
      


      BSessionLocator.locate() is a static method that gets BSession from JNDI

      I am using JBoss 4.0.0

      Thank you for your help.