[omniORB] Weekend CORBA blues #3: automatic ORB::run()

Duncan Grisby dgrisby@uk.research.att.com
Mon, 11 Jun 2001 11:08:55 +0100


On Monday 11 June, Bruce Fountain wrote:

> I made a rather startling observation last night. You don't need to call
> ORB::run() to process incoming CORBA requests. Somehow omni works out that I
> am a server and kicks off the request handling in another thread.

This is true.

> This seems to me to be quite extraordinarily clever, but I was wondering
> if there are any gotchas associated with this behaviour. When does the run()
> kick off? On CORBA::ORB_init()? When I activate the POA? If I call
> ORB::run() does that mean that control of the request handling is passed
> over to my thread?

The threads to accept incoming connections are started when you first
acquire a reference to the Root POA. No operations are dispatched
until you have activated at least one POA, of course.

omniORB always dispatches calls on its own threads. ORB::run() simply
blocks the calling thread until the ORB is shutdown.

Cheers,

Duncan.

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