[omniORB] Main Thread Mode - POA Questions

Craig Wright craig.wright at cometsolutions.com
Wed Nov 12 18:13:02 GMT 2003


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.

So far I have the following for my orb initialization.

   char* argv[1] = { "" };
   int argc = 1;

   orb_ = CORBA::ORB_init(argc, argv, "omniORB4");
   CORBA::Object_var obj = orb_->resolve_initial_references("RootPOA");
   poa_ = PortableServer::POA::_narrow(obj);
   PortableServer::POAManager_var pman = poa_->the_POAManager();
   pman->activate();

   // make sure that all connections are handled on the main thread.
   omniORB::setMainThread();


However, omniORB is still creating threads for incoming calls. I have read 
somewhere that I need to set the policy for the POA to use the main thread as 
well, however I can not figure out how to do this. Does anyone know? Am I on 
the right track?

Thanks,

-Craig.


-- 
| Craig W. Wright
| Software Engineer
| craig.wright at cometsolutions.com
| (505) 323-2525
|
| Comet Solutions, Inc.
| 11811 Menaul Blvd. NE, Suite #1
| Albuquerque, NM
| USA





More information about the omniORB-list mailing list