[jbossws-issues] [JBoss JIRA] Commented: (JBWS-2192) Asynchronous calls not thread safe

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Mon May 26 04:51:43 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBWS-2192?page=comments#action_12414179 ] 
            
Thomas Diesler commented on JBWS-2192:
--------------------------------------

Darran sais

Debugging this issue it is apparent that this behaviour is because the CommonClient, CallImpl and ClientImpl are not thread safe and the same ClientImpl instance is used for the concurrent asynchronous calls even though the Port was called sequentially.

I see this is as a side effect of the requirements for some state to be available for subsequent calls to the client classes.

However it does not look overly complicated to make the actual calls thread safe so if a client does make multiple asynchronous calls then the calls will be valid.


> Asynchronous calls not thread safe
> ----------------------------------
>
>                 Key: JBWS-2192
>                 URL: http://jira.jboss.com/jira/browse/JBWS-2192
>             Project: JBoss Web Services
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: jbossws-native
>            Reporter: Thomas Diesler
>             Fix For:  jbossws-native-3.0.3
>
>
> Darran sais:
> I am currently looking at a support case where the customer is getting a number of errors with asynchronous JAX-WS invocations using a AsyncHandler.
> I am running a couple of test cases against the two EAP releases and I am able to reproduce the behaviour that the customer is seeing but I just quickly wanted to double check what should be thread safe.
> I have an async method on the SEI that returns a Future instance and takes an AsyncHandler as a parameter: -
>    @WebMethod(operationName = "lookup")
>    public Future<?> lookupAsync(final Person person,
>                                 AsyncHandler<TelephoneNumber> handler);
> This pattern seems to suggest that after the call has been made any further interaction will be with the Future instance or the handler which then makes it look as though the Port is free to service other requests.
> However if I submit multiple requests using the same Port then the outgoing requests start to get mixed up.
> Should it be possible to re-use the same Port / SEI Proxy for multiple calls without worries of messages being mixed up?
> I would have thought if the Port was not supposed to be re-used the get methods for the response would be on the Port instance and not need to use this returned interface.
> I have attached the client I am using to reproduce the errors.
> Creating a new Port for each request does overcome this issue but they are trying to avoid this especially as the existing Port should have passed the last request off to another thread for processing.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbossws-issues mailing list