Hessian call with timeout

From: Jerónimo López Bezanilla <jerolba@xxx.com>
Date: Tue Feb 01 2005 - 11:01:19 PST

Hello all,

It's a simple question about timeouts with Hessian services

I've a service implementation that sometimes spend a lot of time
running and I want in my client code to get a exception (timeout) if
the execution time is grater than n seconds.

Is there any way to tell to the HessianProxy or HessianFactory a timeout??

something like that:

public method() throws Throwable {
int timeout=30;
HessianProxyFactory factory = new HessianProxyFactory();
MyService myservice = (MyService) factory.create(MyService.class, url,timeout);
myservice.mymethod(param1,param2);
....
....

}

if in 30 seconds, mymethod doesn't end, get an exception and later catch it.

Thanx
Received on Tue 01 Feb 2005 11:01:19 -0800

This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:16:40 PDT