Naming Service: Binding compound names using a DLL_ORB

Naming Service: Binding compound names using a DLL_ORB

Post by marco wedekin » Wed, 18 Dec 2002 06:32:33



Hello,

my second problem for today occurs while trying to resolve a compound name
with the TAO_Naming_Client.

    TAO VERSION: 1.2
    ACE VERSION: 5.2

HOST MACHINE and OPERATING SYSTEM:
intel Pentium II 266Mhz / SuSE Linux 7.3

COMPILER NAME AND VERSION (AND PATCHLEVEL):
g++ 2.95.3

AREA AFFECTED:
Naming Service: Binding compound names using a DLL-ORB.

DOES THE PROBLEM AFFECT:
        COMPILATION?
No.
        LINKING?
No.
        EXECUTION?
Yes.

    SYNOPSIS:
After successfully (?) registering a server-object under a compound name, the
client fails to resolve that name.

    DESCRIPTION:
The server uses a DLL_ORB, which seems to be a part of the problem, since I
can register and resolve CORBA-objects using compound names if I just use a
"simple" ORB. But the same approach did not work with the DLL_ORB on the
server-side.
I try to register the object like this:

//------------------------------------------------------------------------------------------------------

// ...
DLL_ORB *orb =
                ACE_Dynamic_Service<DLL_ORB>::instance (this->orb_);

this->orb_manager_ = orb->orb_manager_;

if (this->orb_manager_.init_child_poa(argc,
                                    argv,
                                    servant_name) == -1)
{
        ACE_ERROR_RETURN ((LM_ERROR,
                   "%p\n",
                                   "MARVIN_Server_Manager::init()\n"),
                -1);                                                            

Quote:}

// ...

PortableServer::POA_var child_poa =
                this->orb_manager_.child_poa();

this->naming_server_.init(orb.in(),
                        child_poa.in(),
                        ACE_DEFAULT_MAP_SIZE,
                        0,
                        1, /* resolve existing name service */
                        0,
                        TAO_NAMING_BASE_ADDR,
                        0 /* no multicast */);

this->orb_manager_.activate_poa_manager ();

CORBA::Object_var server = server_._this();

//Binding compound Name ?
CosNaming::NamingContext_ptr
        marvin_context = this->naming_server_->new_context();
CosNaming::NamingContext_ptr
        server_context = this->naming_server_->new_context();

CosNaming::Name marvin_context_name;

marvin_context_name.length(1);
marvin_context_name[0].id = CORBA::string_dup("MARVIN");

this->naming_server_->rebind_context(
        marvin_context_name,
        marvin_context);

CosNaming::Name server_context_name;

server_context_name.length(1);
server_context_name[0].id = CORBA::string_dup("Server");

marvin_context->rebind_context(
        server_context_name,
        server_context);

CosNaming::Name name;  

name.length(1);
name[0].id = CORBA::string_dup(this->name_);

marvin_context->rebind(name, server.in());

// ...

//------------------------------------------------------------------------------------------------------

The server starts up without problems. Afterwards I start the client.
In the client I try to resolve the name like this:

// ...

CosNaming::Name name;
name.length (3);
name[0].id = CORBA::string_dup ("MARVIN");
name[1].id = CORBA::string_dup ("Server");
name[2].id = CORBA::string_dup (argv[1]);

CORBA::Object_var server_object =
          naming_client->resolve (name);

// ...

It fails with:

(2239|1024) EXCEPTION, Unexpected exception in client
user exception, ID 'IDL:omg.org/CosNaming/NamingContext/NotFound:1.0'

Which tells me, that the binding of the new naming contexts has failed in the
server...

Why does the binding of CORBA-objects with compound names seem to fail, when
using a DLL-ORB?

Thanks in advance,

Marco Wedekind

 
 
 

1. querying name bindings registered in the Tao Name Service

Hello,

I am using ACE 5.2.1 + TAO 1.2.1 on Win2000 (and VC++).

One question:
1) Is there a way to find out the name bindings (or the naming graph)
   for the Names-versus-Proxies registered in the Tao name service ?
   (may be a dump of textual representation of the bindings similar to
    unix pathname format would be fine).

Bill

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

2. Palmax

3. Naming service resolve crashed both application and naming service on Redhat 8.0

4. System Resources question

5. Naming Service bind causes wrong exception on RH7.2 and RH8

6. *************IGNORE******************

7. Naming Service Already Bind problem

8. Password

9. using multiple naming services from one program

10. [TAO-Corba]: [Conecting client to server on different machine using 'Naming Service']

11. : [Conecting client to server on different machine using 'Naming Service']

12. Problem using TAO Naming Service with TAO Implementation Repository