[omniORB] Problem when porting the orbix code

Duncan Grisby dgrisby@uk.research.att.com
Mon, 20 Nov 2000 10:58:22 +0000


On Monday 20 November, "GAO,YAN (HP-Singapore,ex3)" wrote:

> 1)	Previously when we use Orbix Orb, for example, We startup process B
> from Process A by using API newSharedServer to get B process started. In
> fact this API will request Orbixd to fork the process B for it. How can we
> do that if using Omni Orb?

There is no built-in way to do that with omniORB. You have to write
your own code to fork a new process.

> 2)	In our server application, the code is something like following:
> 
> 	While(1)
> 	{
> 	     processNextEvent(TIMEOUT);  // in Orbix processnextEvent will
> block for TIMEOUT before its function was called.
> 	                                                        // if  no
> request coming in, following code will be executed.
> 	     
> 	     Doing other jobs;
> 	}
> 
> 	But in Omni Orb, it use orb-> run to block there and we can not get
> our other job done, how can we achieve that?

omniORB always dispatches incoming calls from its own threads. You do
not have to call orb->run() at all. You can do whatever you want in
your main thread without any impact on omniORB's dispatching.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --