Please don't forget to log a bug and upload a diff :)
thanks,
dims
On 5/12/06, Chamikara Jayalath <[EMAIL PROTECTED]> wrote:
Hi Jaliya,
I could get this working after two changes.
Firstly Axis2 stops the SAS listner when the serviceClient.finalizeInvoke
() is called.
so I commented out the following line in the finally block.
sender.finalizeInvoke();
Secondly there seems to be a bug in the
serviceclient.sendReceiveNonBlocking(QName,
OMElement,Callback) method.
It is setting a new CallbackReceiver every time the method is called.
Insted this should be
set only if its not already there in the operation. So I corrected this
method as following.
public void sendReceiveNonBlocking(QName operation, OMElement elem,
Callback callback)
throws AxisFault {
MessageContext mc = new MessageContext();
fillSoapEnvelope(mc, elem);
OperationClient mepClient = createClient(operation);
// here a blocking invocation happens in a new thread, so the
// progamming model is non blocking
mepClient.setCallback(callback);
mepClient.addMessageContext(mc);
if (options.isUseSeparateListener()) {
if (callbackReceiver == null) {
callbackReceiver = new CallbackReceiver();
}
if
(axisService.getOperation(operation).getMessageReceiver()==null)
axisService.getOperation(operation).setMessageReceiver(callbackReceiver);
}
mepClient.execute(false);
}
(changed line is in bold).
After these two changes this worked for me. I tested upto 100 threads.
Chamikara
On 5/13/06, Jaliya Ekanayake <[EMAIL PROTECTED]> wrote:
>
> Oops wrong file. Please use the attached
>
>
>
> On 5/12/06, Jaliya Ekanayake < [EMAIL PROTECTED]> wrote:
> >
> > Hi Devs,
> >
> > I wanted to run several clients to measure some performance.
> > The attached client does not get the result for all the threads and it
hangs. IMHO the problem is due to the way we use the client side transport
listener.
> > If client has some control at least to stop it then we will be able to
handle this kind of scenarios.
> >
> > Although I am using the same service for all the clients a more
realistic example would be to invoke two services (or two operations)
asynchronously sharing same configuration context.
> >
> > Can someone point me what is the error I have in the attached code.
> >
> > Thanks,
> >
> > Jaliya
> >
> >
>
>
>
--
Davanum Srinivas : http://wso2.com/blogs/