[omniORB] Motif - 2nd try

Duncan Grisby dgrisby@uk.research.att.com
Tue, 27 Apr 1999 18:21:44 +0100


On Tuesday 27 April, "Loftin, William, CTR" wrote:

> I'm looking for any information on how to inter-mix CORBA (omniOrb) and X
> (Motif) applications.  I am using UIM/X to build the GUI and need some
> assistance and advice with the CORBA aspects.. what the hooks are and where
> they are placed within the X client.  I have seen the Orbix example but this
> is not the type of interface I am looking for.  Buy all appearances I need
> the GUI to look like a typical CORBA client. 

omniORB differs from some other ORBs in that it is fully
multi-threaded. It does not have a single event loop that you can hook
into. The way to use X in conjunction with omniORB is to have a
separate thread to perform the X event loop.

Of course, this means that you have to be very careful to access X in
a thread-safe way. Some versions of Xlib have an XInitThreads()
function which makes them thread-safe; others do not. I don't know if
Motif is thread-safe. To interrupt the X event loop from a CORBA call,
you can either use XSendEvent() if your Xlib is thread-safe, or create
a pipe for the X event loop to select on. Then, the CORBA operation
can put some data on the pipe to break free from the X event loop.

HTH,

Duncan.

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