Invoking Java Agent multiple times causes server to crash

Hi All,

I am calling one Java agent though the Lotus Script code in a loop.

The Java agent does the following things :

It uses the .class files which are generated through Apache Axis frame work , based on this it will performs some web service consuming actions.

The problem for me here is after calling this Jave agent around 200+ times it throws up with a outofMemory exception and finally ends up with crashing the server.

Error Description :

Agent error: java.lang.OutOfMemoryError

JVM: Creation of the lotus/domino/AgentLoader object failed.

Addition informaiton about the error description :

error: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultSubcode: faultString: Failure trying to get the Call object; nested exception is: java.lang.OutOfMemoryError faultActo

r: faultNode: faultDetail: {WebServices - Axis}hostname:lnslabs05

11/12/2009 08:35:19 Agent error: Failure trying to get the Call object; nested exception is: java.lang.OutOfMemoryError

11/12/2009 08:35:19 Agent error: at com.maconomy.CustomerManagementSOAPBindingStub.createCall(CustomerManagementSOAPBindingStub.java:295)

11/12/2009 08:35:19 Agent error: at com.maconomy.CustomerManagementSOAPBindingStub.getCustomers(CustomerManagementSOAPBindingStub.java:303)

11/12/2009 08:35:19 Agent error: at webServiceCustomerHandler.isCustomerExists(MaconomyWebServices.java:387)

11/12/2009 08:35:19 Agent error: at JavaAgent.NotesMain(JavaAgent.java:19)

11/12/2009 08:35:19 Agent error: at lotus.domino.AgentBase.runNotes(Unknown Source)

11/12/2009 08:35:19 Agent error: at lotus.domino.NotesThread.run(Unknown Source)

11/12/2009 08:35:19 Agent error: Caused by:

11/12/2009 08:35:19 Agent error: java.lang.OutOfMemoryError

11/12/2009 08:35:19 Agent error: at

11/12/2009 08:35:19 Agent error: java.lang.Class

11/12/2009 08:35:19 Agent error: .

11/12/2009 08:35:19 Agent error: getDeclaredMethodsImpl

11/12/2009 08:35:19 Agent error: (Native Method)

11/12/2009 08:35:19 Agent error: at

11/12/2009 08:35:19 Agent error: java.lang.Class

11/12/2009 08:35:19 Agent error: .

11/12/2009 08:35:19 Agent error: getDeclaredMethods

11/12/2009 08:35:19 Agent error: (

11/12/2009 08:35:19 Agent error: Class.java