[omniORB] omniINSPOA problem

yakov.gerlovin at philips.com yakov.gerlovin@philips.com
Thu May 8 10:42:01 BST 2003


Hi,

      I'm wondering if there is any restrictions on omniINSPOA usage.
It looks like              resolve_initial_references("omniINSPOA") call  throws exception if called NOT from the same thread as ORB_init.
I thought, one can call   use 'resolve_initial_references' from any thread at any stage during ORB's lifecycle. Is it right?

Thank you for your help,
Yakov


P.S.
The code is like this:



// static variable
static CORBA::ORB_var s_Orb = CORBA::ORB::_nil();

// thread 1
void *first_thread(void *init_arg)
{
      ...
      omniORB::callTimeOutPeriod(omniORB::clientSide , l_lClientTimeout);
      omniORB::callTimeOutPeriod(omniORB::serverSide , l_lServerTimeout);
      s_Orb = CORBA::ORB_init(argc,argv,"omniORB3");
      // if I add the next line, the second thread works fine
      // CORBA::Object_var obj = s_Orb->resolve_initial_references("omniINSPOA");
}


// thread 2
void *second_thread(void *init_arg)
{
      CORBA::Object_var obj   = s_Orb->resolve_initial_references("omniINSPOA");  // Exception thrown here
      ...
}








More information about the omniORB-list mailing list