Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-2540

Multiple threads can modify targetURL in HTTPSender

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.4
    • None
    • Basic Architecture
    • all platforms

    Description

      the targetURL in HTTPSender is shared by multiple threads, in a highly concurrent and multi-threaded environment, and multiple threads modifies the targetURL and the messages endup going to wrong endpoint.

      Our customers experienced this problem in production environment and we created a simple test case to reproduce this, just place Thread.sleep(1000) right before calling writeToSocket ( ) and try to send messages from multiple threads to different endpoints. you would notice the messages going to wrong endpoints.

      Fix: Remove the targetURL instance variable in HTTPSender.java and make it local to the public void invoke(MessageContext msgContext) throws AxisFault method. I am attaching the fixed HTTPSender.java. I fixed it on top of 1.4 release source. I thought it would benefit others who uses wsif-axis in multi-threaded environment.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--HTTPSender.java
          33 kB
          Muruga Chinnananchi

        Issue Links

          Activity

            People

              Unassigned Unassigned
              muruga Muruga Chinnananchi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: