Out Of Memory Problem


I have written a small sequence which has only JavaObjectGateway with Create function followed by Call (which invokes a method and gets data). This works absolutely fine.

But when i try to execute the sequence multiple times i get OutOfMemory Error (response code 503).

Is there a way to call a static method with out actually creating an instance of a class ( Class.staticMethod() ) . Please help me in this regard.


Hi Nagesh,

I do not believe the JavaObjectGateway currently supports the calling of static methods wihtout first instantiating an instance of the class.

As a circumvention, you might consider writing a small custom component that can be used to call the static method.

Hope this helps.

Hi Mike,
Thanks for your quick response. We will try writing our own custom component and I hope it works.

But my primary concern is the OutOfMemoryException that mediator throws when invoking a sequence(s) in quick succession one after the other. I believe that for each sequence invocation the Java class instance being created is not garbage collected. We have checked this by removing the JavaObject gateway in the sequence and it works fine (No OutOfMemoryException).

Please help me in this regard.

Thanks in anticipation,

Hi Nagesh,

Can you clarify what you meant when you say “invoke the sequences in quick succession”? Are you running several (10s, 100s) before the error occurs, or is it after 2 or 3? Also, how frequently are you running them - 1 per minute, 1 per second, 100 per second?

Last, can you tell me a bit about the class you are creating? Is it large or does it have a lot of other classes involved?

Hi Mike,

I first run a sequence. Upon receiving a response I immediately execute the same again. In some instances I have found that this gets rejected by the ServletPortal .The later is observable over two consequtive runs from a standalone client program. Also the sequence is small with only a single Java Object to be invoked.