[omniORB] Multithreading

Luke Deller ldeller@xplantechnology.com
Tue Jun 25 02:24:00 2002


Hi Leandro,

It's probably worthwhile taking up this problem with the CorbaScript developers.

Meanwhile, to force CorbaScript to be used in a single-threaded fashion:
What you are interested in is the threading policy of the POA.  There is a 
POA threading policy called SINGLE_THREAD_MODEL which I think does what you 
require.  However I am not aware of any command-line option which adjusts 
the policies of the Root (default) POA.  [If there was such an option, it 
would break the CORBA spec which dictates the policies of the Root POA].

You may be able to force CorbaScript to be used in a single-threaded fashion 
by modifying it to create another POA (with the SINGLE_THREAD_MODEL policy) 
to be used instead of the Root POA.  This should involve quite simple 
modifications to CorbaScript's source code.

(I haven't tried using SINGLE_THREAD_MODEL with omniORB.. does it work?)

The POA is described in chapter 11 of the Corba specification; in particular 
check out section 11.2.8, 11.3.7 and 11.3.8.

Regards,
Luke.

Leandro Fanzone wrote:
> Thank you for your answer; my problem is with CorbaScript, a piece of 
> software that I did not write and that is to be compiled with omniORB. 
> Working as a server, CorbaScript under heavy use by several clients 
> collapse with a segmentation fault, and I suspect it is a (lack of) 
> synchronization problem. I took a brief look at their code, and it seems 
> not to be multithread aware. So if I could pass some ORB option through 
> command line to prevent the multithreaded handling of the incoming 
> clients, perhaps I could attenuate the problem; the sole idea of doing 
> the synchronization myself in a source as extensive as is CorbaScript 
> without knowing its inner mechanisms scares me. In any case I still 
> could not identify positively the problem, so perhaps it even has 
> nothing to do with this, but knowing how to avoid multithreading could 
> help me to find the problem, or discard theories.
> 
> bjorn rohde jensen wrote:
> 
>> Hi Leandro,
>>
>> OmniORB is always multithreaded, you can not change that, but
>> why would you want to? You can always do the required
>> synchronisation yourself.
>>
>> Yours sicnerely,
>>
>> Bjorn
>>
>>  
>>
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list@realvnc.com
> http://www.realvnc.com/mailman/listinfo/omniorb-list
> 
>