Hmmm....

You have multiple threads calling the same Client object.

Yes, the Client object is not thread safe, it is not even ok to call
invoke() while the service hasn't returned a response -- which comes into
play when you deal with async services.

Client uses Instance variables to keep track of it's state... For example:

    public Object[] invoke(OperationInfo op, Object[] params) throws
Exception
    {
        try
        {
            OutMessage msg = new OutMessage(url);
            msg.setBody(params);
            msg.setChannel(getOutChannel());
            
            context = new MessageContext();
            context.setService(service);
            context.setXFire(xfire);
            context.setBinding(binding);
            context.setProperty(CLIENT_MODE, Boolean.TRUE);
            context.setClient(this);

Context is such an instance variable... Every invocation of invoke creates a
new MessageContext, so the still running call get's it's message context
changed while in situ....

There is a JIRA Issue to rearchitect the Client side, but we have some way
to go, so don't expect something in Xfire 1.1.

Try creating a fresh Client for every Thread, if that doesn't show this
behaviour, it's the above described.

Mika

-----Ursprüngliche Nachricht-----
Von: Sascha Sadat-Guscheh [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 30. März 2006 15:00
An: [email protected]
Betreff: Re: AW: [xfire-user] strange xfire (concurrency?) behaviour


add-on the second:

it seems that there's an issue with threading, NOT with concurrency 
(sound stoopid, i know)

if i run the threaded test (which i posted before)  i get all these 
strange errors. when i run the same test, i.e..
run the callMethod 1000 times from 3 different machines against the 
server, everything is ok.
so maybe the client classes are not threadsafe?

sorry for spamming the list, but there's a big dark deadline hanging 
over us ..

Reply via email to