axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal jayasinghe <deep...@gmail.com>
Subject Re: [axis2] issues in using custom configuration context
Date Fri, 25 Jan 2008 10:12:26 GMT
Hi Michele ,
Have you done any changes to your client side axis2.xml , if so what are
they ?

Thanks
Deepal
> Deepal,
>
> apart from that I made no changes at all. Here is my code.
>
> try {
>     sender = new ServiceClient(getConfiguration(), null);
> } catch (Exception e) {
>     throw new RuntimeException(e);
> }
>
> synchronized (ENGAGE_MODULE_LOCK) {
>     sender.engageModule(Constants.MODULE_ADDRESSING);
> }
>
>
>
> private ConfigurationContext getConfiguration() throws Exception {
>         ConfigurationContext configurationContext =
> ConfigurationContextFactory
>                 .createConfigurationContextFromFileSystem(null, null);
>
>         HttpConnectionManager connectionManager = new
> MultiThreadedHttpConnectionManager();
>         HttpConnectionManagerParams connectionManagerParams = new
> HttpConnectionManagerParams();
>         // 10 seconds
>         connectionManagerParams.setConnectionTimeout(10000);
>         connectionManagerParams.setMaxConnectionsPerHost(
>             HostConfiguration.ANY_HOST_CONFIGURATION, 30);
>         connectionManagerParams.setDefaultMaxConnectionsPerHost(30);
>         connectionManagerParams.setMaxTotalConnections(200);
>         connectionManagerParams.setTcpNoDelay(true);
>         connectionManagerParams.setStaleCheckingEnabled(true);
>         connectionManagerParams.setLinger(-1);
>
>         HttpClient httpClient = new HttpClient(connectionManager);
>
>         configurationContext.setThreadPool(new ThreadPool(1, 5));
>
>         configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
>             Boolean.TRUE);
>        
> configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
>             httpClient);
>
>         return configurationContext;
> }
>
>
> However using this set up I've noticed that after some time I get a
> BindException -- I think it's because I use only one AxisCallback
> object to receive many responses.
>
>
> Michele
>
> On 25 Jan 2008, at 10:02, Deepal Jayasinghe wrote:
>
>> hmm ,if that is the case there should be something wrong with your
>> axis2.xml . So what are the additional changes that you have made ?
>>
>> Thanks
>> Deepal
>>> Hi again,
>>>
>>>
>>> some more details. If the configuration context is created using the
>>> following statement
>>>
>>> ConfigurationContext configurationContext = ConfigurationContextFactory
>>>                 .createConfigurationContextFromFileSystem(null, null);
>>>
>>> and then the customization is made as before (i.e.
>>> MultiThreadedHttpConnectionManager and cached HttpClient) the system
>>> seems to work fine.
>>>
>>>
>>>
>>> Michele
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>>
>>
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message