Multiple threads can modify targetURL in HTTPSender
---------------------------------------------------

                 Key: AXIS-2540
                 URL: http://issues.apache.org/jira/browse/AXIS-2540
             Project: Apache Axis
          Issue Type: Bug
          Components: Basic Architecture
    Affects Versions: 1.4
         Environment: all platforms
            Reporter: Muruga Chinnananchi
            Priority: Critical
         Attachments: HTTPSender.java

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.

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to