[omniORB] Nameservice question.
Walt Yao
Walt.Yao@cl.cam.ac.uk
Wed, 19 May 1999 15:54:10 +0100
> example, gets as far as attempting a bind to the 'test' context:
> rootContext->bind_new_context(contextName);
>
> at which point, it throws an exception which is caught by the anonymous catch block:
> catch (...) etc.
>
> I don't quite understand why an exception should be thrown at this stage. Clearly, the server has
> bound to the name service and retrieved the root context. Apart from the specified exception types
> (COMM_FAILURE and fatalException) why else would bind_new_context fail?
>
If you look at the IDL of the Cos nameservice, you will see bind_new_context()
might throw four types of exception, depending on the error condition.
'NotFound' when the name given is not bound; 'InvalidName' when, obviously,
the name given contains invalid characters or violates some naming rules;
'AlreadyBound' when the name you give is already bound to a context; and
lastly 'CannotProceed' when the implementation (i.e. nameservice) gave up for
some reasons.
Grab a copy of CORBAService spec and you'll be clear with what these are.
// Walt