hello,
I have a bug with my client (stub) when i use
stub._getServiceClient().engageModule(new QName("addressing"));
After 2650 request i have "Exception in thread "main"
java.lang.OutOfMemoryError: Java heap space"
If i don't use engageModule(new QName("addressing")); there is no problem.
You can find my code (stub is created with wsld2java and
Exception.
I don't find workaround on Jira. Can you help me to solve my problem.
thanks,
- Fabrice
package com.centile.test;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import javax.xml.namespace.QName;
import com.centile.ws.ent.EnterpriseStub;
public class Main{
public static void main(String[] args) throws Exception {
EnterpriseStub stub =
new
EnterpriseStub("http://nounours:8078/axis2/services/Enterprise?wsdl");
stub._getServiceClient().engageModule(new
QName("addressing"));
stub._getServiceClient().getOptions().setManageSession(true);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Boolean.TRUE);
ConfigurationContext configurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
null);
HttpClient httpClient = new HttpClient(new
MultiThreadedHttpConnectionManager());
configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Boolean.TRUE);
configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
httpClient);
int i=0;
while(true){
System.out.println(i++);
System.out.println(stub.isConnected().get_return());
}
}
}
false
2653
false
2654
false
2655
false
2656
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
[EMAIL PROTECTED]:~/Project/eclipseworkspace/isaudit/bin$
begin:vcard
fn:Fabrice Airault
n:Airault;Fabrice
org:Centile
email;internet:[EMAIL PROTECTED]
tel;work:+33 4 97 23 12 94
x-mozilla-html:FALSE
version:2.1
end:vcard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]