Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-2192

Asynchronous calls not thread safe



    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: jbossws-native
    • Labels:


      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.

        Gliffy Diagrams




              • Assignee:
                thomas.diesler Thomas Diesler
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: