AXIS2 Client

Thamayanthi Guhan <[email protected]>
Newsgroups gmane.text.xml.axis.user
Message-ID <CALU9Uug-k1RoqaDweDqPF28WCgjAA7hNTsqFmzSFGNQz5Lqwfg@mail.gmail.com>
Hi

I am writing axis 2 web service client for persistent connection.
Persistent Connections are not closed when server goes down.

when i use netstat -acpcl connection status as ESTABLISHED all the time.

any help will really save my time, i searched in .net but could not find
any useful

below is my configuration:

configurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null ,
null);
 MultiThreadedHttpConnectionManager multiThreadedHttpConnectionManager =
new MultiThreadedHttpConnectionManager();
HttpConnectionManagerParams connectionManagerparams = new
HttpConnectionManagerParams();
 logger.trace("Default MaxTotalConnection : {}",
connectionManagerparams.getMaxTotalConnections());
logger.trace("Default ConnectionTimeout : {}",
connectionManagerparams.getConnectionTimeout());

connectionManagerparams.setDefaultMaxConnectionsPerHost(supportedOptions.getMaxConnectionPerCacheHttpClient());
connectionManagerparams.setMaxTotalConnections(supportedOptions.getTotalMaxConnection());
 connectionManagerparams.setStaleCheckingEnabled(true);
connectionManagerparams.setLinger(supportedOptions.getConnectionIdleTime());
 connectionManagerparams.setTcpNoDelay(true);
connectionManagerparams.setSoTimeout(supportedOptions.getSoTimeout());

connectionManagerparams.setConnectionTimeout(supportedOptions.getConnectionTimeout());
 multiThreadedHttpConnectionManager.setParams(connectionManagerparams);
 if (supportedOptions.isUseConnectionIdleTime()) {
multiThreadedHttpConnectionManager.closeIdleConnections(supportedOptions.getConnectionIdleTime());
 }
 HttpClient httpClient = new HttpClient(multiThreadedHttpConnectionManager);

configurationContext.setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION,
supportedOptions.getProtocolVersion());
 configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
supportedOptions.isReuseHttpClient());
 configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
httpClient);

creating stub using configuration context.

using jboss 7 but if i stop server all the connections are closed.

Thanks
Thamayanthi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.