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...