binding-ws-axis2 should use Axis2 ServiceClient in thread-safe manner
---------------------------------------------------------------------

                 Key: TUSCANY-3643
                 URL: https://issues.apache.org/jira/browse/TUSCANY-3643
             Project: Tuscany
          Issue Type: Bug
    Affects Versions: Java-SCA-2.0-M5, Java-SCA-1.6
            Reporter: Scott Kurz
            Priority: Minor


In running a version of our 1.x code (the exact version doesn't so much matter 
since the problem has existed for awhile), against the Axis2 trunk running 
multiple threads at once, I hit the problem:

java.lang.NullPointerException
        at 
org.apache.axis2.client.ServiceClient.cleanupTransport(ServiceClient.java:860)
        at 
org.apache.axis2.client.ServiceClient.createClient(ServiceClient.java:665)
        at 
org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient(..)
        at 
org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget(...)
        at 
org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke(....)

It seems Axis2 has introduced a new "autoOperationCleanup" function.   

So one solution would be to disable this.  However, it seems from discussions 
such as this:

  http://www.mail-archive.com/[email protected]/msg48406.html

that a better solution would be to stop using a single Axis2 ServiceClient 
across threads, since apparently these are not intended to be thread-safe.    
So it seems we should switch from using an instance variable to a local 
variable to hold these refs.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to