Re: how to set the argument "-ORBInitref" innamingservice on vxworksplatform
Duncan Grisby via omniORB-list <[email protected]> Thu, 21 Jun 2018 11:06:37 +0100
| Newsgroups | gmane.comp.corba.omniorb.user |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 2018-06-09 at 18:04 +0800, Tonny.W wrote: > > Thank you for your reply. What I do is to port omniorb on the > vxWorks system, include the name service. My step is as following : But _why_ are you including the naming service? For what purpose? > 1. I create a project naming "omniNams". In the file of > "omniNames.cc " ,part of my code is as follows.Then I compile and > run it as a thread in the target board: A "thread" sounds like is is sharing the process with other things, including your naming service client. Is that right? In omniORB, the ORB and the POAs are global to the process they are used in. So, if your thread for omniNames is actually the same process as your client, you are sharing things that you might not intend. [...] > 3. My question is that it throw a exception of "Caught > CORBA::OBJECT_NOT_EXIST" ,when excute the code > " CosNaming::NamingContext_var rootContext = > CosNaming::NamingContext::_narrow(obj);" As the exception says, the object it is trying to call does not exist. The object is meant to be the root NamingContext from omniNames. Did you actually invoke the bit of code in omniNames that activates the objects? It's the call to log_->init() in the normal main() function that does that. [...] > However,in vxworks, the function callas following: [...] > (6) omniInProcessIdentity::dispatch(omniCallDescriptor& > call_desc)in the file of " inProcessIdentity.cc" > > The difference is that the (5)function calls different funtion > in the (6) funtion ,I don't know why. It's using an in-process identity object because the NamingContext object (which doesn't actually exist) claims to be in the same process as the caller. In the working Windows case, the object is in a remote process, so it uses a remote identity. Before getting carried away with the details of how to initialise everything, you need to be very clear about what you are trying to achieve and why. It strikes me as very odd that you are trying to run omniNames and clients of it in the same process. What is the value of having the naming service in that situation? What objects are going to be registered in omniNames? What is going to look them up? Duncan. -- -- Duncan Grisby -- -- [email protected] -- -- http://www.grisby.org -- _______________________________________________ omniORB-list mailing list [email protected] http://www.omniorb-support.com/mailman/listinfo/omniorb-list