Hi,
I confirm that without Sandesha there is no problem to reused the
configurationContext and send multiple messages with it.
So it's a specific problem of RM module with my specific used (but
advise by Axis2 team ;) in my context...)
I already had a problem to shutdow the sandesha module at this end of my
client (with Axis2 1.2 MEP IN-OUT synchrone a listener is not start and
sandesha is never shutdown...) is it related ?
So how configure the contextContext to re-used it with sandesha without
re-create it pleased ?
Regards.
Jérôme
Jerome Camilleri wrote:
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
------------------------------------------------------------------------
Subject:
Too many open file with Axis2 1.2
From:
Jerome Camilleri <[EMAIL PROTECTED]>
Date:
Mon, 18 Jun 2007 16:24:42 +0200
To:
[EMAIL PROTECTED]
To:
[EMAIL PROTECTED]
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]
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]