HI,
Currently we are using http 3.2 in our application. Http 3.2 has no support
for endpoint level timeout. So we created a customized endpoint just by
extending HttpEndpoint and providerProcessor.
In the new ProviderProcessorClass I am overriding the getClient method as
follows:
protected HttpClient getClient() {
HttpComponent comp = (HttpComponent) endpoint.getServiceUnit()
.getComponent();
HttpClient client = comp.getClient();
client.getParams().setSoTimeout(
((DNBHttpEndpoint) endpoint).getTimeout());
return client;
}
So, Http component gets the HttpClient configured with the required timeout.
As we are settting the timeout using setSoTimeout, we should get an
exception when the request exceeds the specified time.
If i set the time as 15000 , I should get an exception after 15 seconds.
But this is not working as expected.
What else i need to change to get this work.
My envronment : JDK 1.5 ; JBoos 4.0.5-GA, Linux, http 3.2 installer with
Jetty 6.1.5
Thanks in Advance....
--
View this message in context:
http://www.nabble.com/Unable-to-use--timeout-in-http-provider-component-tp21954855p21954855.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.