Re: NameService



> >Hi,
> >
> >I'm quite new with CORBA and corbacpp. I downloaded your source code
> and found
> >the orb and poa stuff in the header files. I think I can use it like
> "advanced
> >CORBA programming with C++".  But I found nothing about the
> NameService yet.
> >Must I use the C stuff CosNaming instead? Or did I miss something?
> >  
> >
> I've never actually used the name service stuff. But for what it's
> worth 
> here is my understanding. ORBit provides CosNaming.idl which defines
> the 
> interface for the name service. It also provides an implementation of
> 
> the name service which you can run. If you have the IOR of the name 
> service you can always connect to it using C++ code (like any other 
> object). ORBit-cpp doesn't provide a library of the stub code for
> you. 
> So you will need to compile the CosNaming.idl to generate the stubs. 
> This is exactly the same as compiling your own IDL except the source 
> file is at /prefix/share/idl/orbit-2.0/CosNaming.idl.

That's my understanding too (although I haven't used the naming service
in ORBit/ORBitcpp since ORBit-0.5 days).

Generally the dance goes something like this (from the depths of my
memory).

compile CosNaming.idl to stubs (this is often done for you by ORBs -
does ORBitcpp do this and dump the stubs somewhere as part of make
install?).

Use the stubs in your code.
Use resolve_initial_references() to get the name service initial object
reference and go from there using the CosNaming C++ stubs.

--

_Advanced CORBA Programming with C++_ goes into detail about what to do
with the object reference you get back from
resolve_initial_references() in the Naming Service chapter. The sample
code should be OK without modification, but you might need to add you
own CosNaming stubs path to the includes list passed to the compiler.

--
  Rich



Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]