Hi,
Related to an Axis2-1.2 bugs (corrected is seems) my client try to send
with Sandesha2-1.2 multiple sequence of message (with MTOM file attached).
Because of the allocation of ressource and to optimised it I try to
factorize the initialization of the Axis2 context.
So my client try this pseudo code :
configurationContext ctx = factory.get(client-repo); // create during
the first call
stub factory.get( ctx ); // create during the first call
stub.engageModule(sandesha2);
for (i=0 ; i<=3; i++) {
if (i==3)
stub.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
stub.sendRequest(putFileRequest);
}
SandeshaClient.waitUntilSequenceCompleted(stub._getServiceClient(),
maxWaitingTimeSequenceCompleted);
For the first call my sequence of 3 message is send correctly but my
second call is failed with this sandesha exception :
Impossible to call remote service
Caused by: org.apache.axis2.AxisFault: Sandesha2 got an exception when
processing an out message: org.apache.sandesha2.SandeshaException:
Sandesha2 could not send the message on sequence
http://localhost:9001/axis2/services/Service1 as the sequence has been
terminated..
at
org.apache.sandesha2.handlers.SandeshaOutHandler.invoke(SandeshaOutHandler.java:159)
at org.apache.axis2.engine.Phase.invoke(Phase.java:383)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:203)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:433)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:256)
at
fr.bull.emetteur.service.Stub.putFileRequestReponse(Stub.java:170)
at fr.bull.emetteur.Emetteur.Emetteur.send(Emetteur.java:116)
... 5 more
Before configurationContext factorization all run well ...
Someone could help me pleased ?
Regards
Jérôme
--- Begin Message ---
Hi,
I used client Axis2 1.2 to send file attached to my WebService.
On my client, I used the
ConfigurationContextFactory.createConfigurationContextFromFileSystem
with a repository containing modules like addressing and sandesha2.
My deamon scan a directory to send the message and create for eatch a
new configurationContext and a new stub.
After eatch sending I call methods to clear the memory (see the end of
this mail) but it seems that some files is lock by my deamon because
after about 300 calls my system is very slow and client stop with the
message "can't open file : Too many open file" in the console (ulimit -n
= 1024)
When I launch the lsof command, I noticed that 4 files is adding for one
file sending
lsof | grep /tmp/axis2
java 21584 camillej 86r REG 3,3 352079
76659 /tmp/axis244513sandesha2-1.2.mar
java 21584 camillej 87r REG 3,3 37572
76658 /tmp/axis244512addressing-1.2.mar
java 21584 camillej 88r REG 3,3 8379
76660 /tmp/axis244514soapmonitor-1.2.mar
java 21584 camillej 89r REG 3,3 1444
76661 /tmp/axis244515version.aar
So my client finally code :
HashMap listeModuleDesc =
configurationContext.getAxisConfiguration().getModules();
Iterator itListeModuleDesc =
listeModuleDesc.keySet().iterator();
while(itListeModuleDesc.hasNext())
{
String moduleDescId = (String)itListeModuleDesc.next();
AxisModule moduleDesc =
(AxisModule)listeModuleDesc.get(moduleDescId);
if (moduleDesc != null) {
Module module = moduleDesc.getModule();
if (module != null) {
module.shutdown(configurationContext);
}
configurationContext.getAxisConfiguration().disengageModule(moduleDesc);
}
}
if (stub != null) {
stub.cleanup();
}
if (configurationContext != null) {
configurationContext.cleanupContexts();
configurationContext.terminate();
}
stub = null;
configurationContext = null;
Can someone I have an idea about my problem... ?
Regards
Jérôme
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]