RE: stub._getServiceClient().getOptions().setTimeOutInMilliSeconds() doesn't work

2009-05-20 Thread DANIEL, Yves Marie
Hi,

During an old project, i used a cached httpClient, and i think that httpClient 
timeout overrided stub timeout (maybe i'm wrong ?), so i used :


Options optionsStub = this._stub._getServiceClient().getOptions();

MultiThreadedHttpConnectionManager conmgr = new 
MultiThreadedHttpConnectionManager();
conmgr.getParams().setDefaultMaxConnectionsPerHost( 
numberOfConnectionsKeepAlive );

if ( timeout != null )
{
//override timeouts ?
conmgr.getParams().setConnectionTimeout( timeout.intValue() );
conmgr.getParams().setSoTimeout( timeout.intValue() );
}

HttpClient client = new HttpClient( conmgr );

// Reuse the client
optionsStub.setProperty( HTTPConstants.REUSE_HTTP_CLIENT, "true" );

// Cache the client
optionsStub.setProperty( 
org.apache.axis2.transport.http.HTTPConstants.CACHED_HTTP_CLIENT, client );

optionsStub.setTimeOutInMilliSeconds( timeout );
this._stub._getServiceClient().setOptions( optionsStub );
 

 Yves-Marie



-Message d'origine-
De : Chad Chen [mailto:cc...@cse.ucsc.edu] 
Envoyé : mercredi 20 mai 2009 09:37
À : axis-user@ws.apache.org
Objet : stub._getServiceClient().getOptions().setTimeOutInMilliSeconds() 
doesn't work

Hi,
I am using axis2 1.4.1 and having problems with the timeout setting. I try to 
set the timeout value to be 30s by:

stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(3);

However, it doesn't work. Any method call will still return successfully even 
long after 30s has passed.

Has anyone seen the same problem?

Thanks,
Chad






This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not the 
intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any 
part thereof. If you receive this message 
in error, please notify the sender immediately and delete all copies of this 
message.



stub._getServiceClient().getOptions().setTimeOutInMilliSeconds() doesn't work

2009-05-20 Thread Chad Chen

Hi,
I am using axis2 1.4.1 and having problems with the timeout setting. I 
try to set the timeout value to be 30s by:


stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(3);

However, it doesn't work. Any method call will still return successfully 
even long after 30s has passed.


Has anyone seen the same problem?

Thanks,
Chad