[omniORB] How to do a timeout (with oO but independent of it) ?

Duncan Grisby duncan@grisby.org
Tue Sep 10 11:43:00 2002


On Friday 6 September, Pfeiffer Daniel wrote:

> For lack of transparent distributed transactions via OTS 1.1 in omniORB, we
> have implemented our own transaction handling.  This steers our own
> primitive (but highly efficient database) on BS2000.  The transport of the
> transaction context and two-phase commit handling gets done explicitly with
> CORBA calls.
> 
> Among other things because tcp-connection establishment is very expensive on
> BS2000, we have a permanent 1:1 relationship between client- and
> server-process, so there can be no confusion among different simultaneous
> method invocations or transactions.
> 
> When a server method does database changes, the server-process _must_ also
> get commited.  So then I have to timeout, just in case the transaction
> monitor dies.
> 
> If SIGALRM is not the way to do it on a multithreaded server, what would be
> the proper way?

I'd do it with a separate thread. You kick the thread into action on
the first call, then signal it to say it's OK on the second call. If
the second call doesn't happen, the thread can do whatever it needs to
do to clean up.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --