Re: setting up client timeout



On Thu, 2004-11-04 at 13:26 -0800, Saurabh Sarpal wrote:
> i have 2 processes on a host running ORBit2 CORBA client and server.
> 
> is there a way to setup a timeout on a client request to the server, if
> the server does not respond in a given time?

	In a word - not easily. What you can do is emit an asynchronous call to
the server & then just ignore the return value if it comes in too late.
Another way is to structure your interface around async. 'oneway' calls;
so you'd send a request - passing a handle to your interface for
callbacks & the server would call you back on it.

> for example, in the case of mt-calulator from orbit-docs, when the
> client invokes the call 'Calculator_add' on the server, can the client
> timeout if the server takes more than a certain time to perform the
> operation. the client can then handle the invocation failure.

	Sadly not, of course - we could implement this on top of the existing
ORBit_policy_* framework - which allows various policies to be
associated with either a client Object handle, or push/pop'd around an
invocation [ see ORBit2/include/orbit/orb-core/corba-object.h ]. It
wouldn't be _too_ hard to create a timeout policy with that; you'd need
to hack it into the poa though.

	HTH,

		Michael.

-- 
 michael meeks novell com  <><, Pseudo Engineer, itinerant idiot



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]