Hi all, thank you Glen for the comprehensive answer. I will do some tests at my side with this.
In fact the question of Amila is one that I am really interested in. I have a similar scenario over here. We have a use case when different clients are created in different threads and all of them are reusing one and the same HttpClient. I will double check the behavior with the new change. thanks, Dobri On Wed, Aug 19, 2009 at 6:33 PM, Amila Suriarachchi < amilasuriarach...@gmail.com> wrote: > hi Glen, > > A quick question, will go through this change properly tomorrow. > > Lets say I want to invoke a service using service client with multiple > threads as follows, > > Thread Class. > > public class InvokeService implements Runnable{ > > private ConfigurationContext configurationContext = null; > > public InvokeService(ConfigurationContext configurationContext) { > this.configurationContext = configurationContext; > } > > public void run() { > try { > ServiceClient serviceClient = new > ServiceClient(configurationContext,null); > serviceClient.setTargetEPR(new EndpointReference(" > http://localhost:8088/axis2/services/Version")); > serviceClient.getOptions().setAction("urn:getVersion"); > OMElement omElement = serviceClient.sendReceive(null); > } catch (AxisFault axisFault) { > axisFault.printStackTrace(); > } > } > } > > Invocation class > > try { > ConfigurationContext configurationContext = > ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,null); > for (int i=1;i<5;i++){ > InvokeService invokeService = new > InvokeService(configurationContext); > Thread thread = new Thread(invokeService); > thread.start(); > } > } catch (AxisFault axisFault) { > axisFault.printStackTrace(); > } > > 1. In this case with your new change how many > MultiThreadedHttpConnectionManager instances created? > > 2. In your test case you have use options. setCallTransportCleanup(true); > is this manadatory? > > As you know this builds the OMElement before returning the response. Which > is not what every one needs. > > thanks, > Amila. > > > > > > -- > Amila Suriarachchi > WSO2 Inc. > blog: http://amilachinthaka.blogspot.com/ >