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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






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



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

Reply via email to