[omniORB] Main Thread Mode - POA Questions

Gary Duzan gduzan at bbn.com
Thu Nov 13 11:41:33 GMT 2003


In Message <200311121813.02586.craig.wright at cometsolutions.com> ,
   Craig Wright <craig.wright at cometsolutions.com> wrote:

=>
=>Hello,
=>
=>I'm new to the list, but have been using omni ORB for some time now. 
=>Previously I had been using it with ORBit where ORBit was in use on my server 
=>and omniORB on my client. I have finally decided to start using omniORB on my 
=>server as well.
=>
=>My server must be single threaded.

   Scott's reply is correct with respect to having the POA serialize
access to the objects. However, that doesn't make it "single threaded";
it only serializes access. The SINGLE_THREAD_MODEL actually allows
different threads to execute the servants, only one at a time. If
you want only one particular thread to execute the servants, you need
to use MAIN_THREAD_MODEL, which is set up the same way and uses the
omniORB::setMainThread() from your original example to pick the thread to
use. Even then, however, you are still going to have multiple threads.
omniORB always creates threads for listening for connections, cleaning
up connections, etc. Even with MAIN_THREAD_MODEL, you will probably
get a thread that listens on the connection, but then wakes up the main
thread to process the request. If you really need a single threaded ORB,
you are going to have to pick something else.

					Gary Duzan
					BBN Technologies
					A Verizon Company





More information about the omniORB-list mailing list