Please don't call createConfigurationContextFromFileSystem multiple
times. just call once when the daemon starts.
thanks,
dims
On 6/18/07, Jerome Camilleri <[EMAIL PROTECTED]> wrote:
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]
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]