[omniORB] Omni Orb and OpenVMS serialized processing

Duncan Grisby duncan at grisby.org
Wed Feb 1 12:19:43 GMT 2006


On Wednesday 1 February, "Jan Knobloch" wrote:

[...]

> I am using VMS AST routines (for timers) and one more application thread
> created with VMS runtime routines for pure socket communication to the
> computers without possibility to run CORBA as follows:
> 
> pthread_create( &m_thread, NULL, tcpThread, NULL );
> 
> The major problem is that I need to synchronize all incoming events/messages
> synchronously. It means one after an other. 
> 
> I have tried to post the events/messages from AST timer routine and my
> TCP/IP thread to CORBA, but it resolves the CORBA object as local and do the
> call directly, without putting it into the queue.

What you should do is activate your CORBA objects in a POA with the
SINGLE_THREAD_MODEL threading policy. If you do that, you don't need to
(mis)use the thread pool options to serialise incoming remote calls, and
also in-process calls will be serialised. That way you will be able to
post your timer messages using CORBA calls to the in-process objects,
and the calls will be properly serialised along with the remote calls.

The alternative is to simply have a mutex in your application code, and
make sure you lock it around your CORBA method implementations and the
other code you need to serialise.

Cheers,

Duncan.

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



More information about the omniORB-list mailing list