[omniORB] Using a corbaloc URI (JacORB client, omniORB server)

baileyk@schneider.com baileyk@schneider.com
Thu Sep 5 20:01:18 2002


I haven't done this, but I'm pretty sure you need to use a special POA (not
the RootPOA).  Each ORB implementation has a proprietary way to make server
objects available via a corbaloc URI.  Look in the omniORB docs for
something called the omniINSPOA.

Kendall


                                                                                                                       
                    "Rob Eger"                                                                                         
                    <reger@txcorp.com>                 To:     <omniorb-list@realvnc.com>,                             
                    Sent by:                            <jacorb-developer@lists.spline.inf.fu-berlin.de>               
                    omniorb-list-admin@omniorb-s       cc:                                                             
                    upport.com                         Fax to:                                                         
                                                       Subject:     [omniORB] Using a corbaloc URI (JacORB client,     
                                                        omniORB server)                                                
                    09/05/2002 01:19 PM                                                                                
                                                                                                                       
                                                                                                                       




This seems like it should be simple, but I can't make it work.  What
I've got is a simple "hello world" type application with a JacORB client
and an omniORB server.  When I try to connect to the server using a
corbaloc I get an org.omg.CORBA.OBJECT_NOT_EXIST error.  I've tried
every possibility for the object key portion (which is where I suspect
the problem is), but nothing has worked.  Everything works fine if I use
the IOR, and also works using omniMapper.  Code snippets are below:

SERVER:

  CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
  PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(obj);

  HelloDemoImpl* di = new HelloDemoImpl();

  PortableServer::ServantBase_var servant = di;
  PortableServer::ObjectId_var diid = rootPOA->activate_object(di);

-----------------------

CLIENT:

  ORB orb = ORB.init(args, null);

  org.omg.CORBA.Object obj =
orb.string_to_object("corbaloc::myhost.mycompany.com:39537/HelloDemo");

  HelloDemo hDemo = HelloDemoHelper.narrow(obj);

-----------------------

It fails on the narrow call.  Here is the output from the server running
with traceLevel of 30:

omniORB: Server accepted connection from giop:tcp:192.168.0.111:39559
omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 3
omniORB: AsyncInvoker: thread id = 3 has started. Total threads = 3
omniORB: Accepted connection from giop:tcp:192.168.0.111:39559 because
of this rule: "* unix,ssl,tcp"
omniORB: inputMessage: from giop:tcp:192.168.0.111:39559 87 bytes
4749 4f50 0100 0000 0000 004b 0000 0000 GIOP.......K....
0000 0000 0100 0000 0000 0009 4865 6c6c ............Hell
6f44 656d 6f00 0000 0000 0006 5f69 735f oDemo......._is_
6100 0000 0000 0000 0000 001b 4944 4c3a a...........IDL:
6a61 6348 656c 6c6f 2f48 656c 6c6f 4465 jacHello/HelloDe
6d6f 3a31 2e30 00                       mo:1.0.
omniORB: throw OBJECT_NOT_EXIST from GIOP_S.cc:315
(NO,OBJECT_NOT_EXIST_NoMatch)
omniORB: sendChunk: to giop:tcp:192.168.0.111:39559 76 bytes
4749 4f50 0100 0101 4000 0000 0000 0000 GIOP....@.......
0000 0000 0200 0000 2700 0000 4944 4c3a ........'...IDL:
6f6d 672e 6f72 672f 434f 5242 412f 4f42 omg.org/CORBA/OB
4a45 4354 5f4e 4f54 5f45 5849 5354 3a31 JECT_NOT_EXIST:1
2e30 0040 0100 4d4f 0100 0000           .0.@..MO....
omniORB: throw giopStream::CommFailure from
giopStream.cc:812(0,NO,COMM_FAILURE_UnMarshalArguments)


Any ideas?

Thanks,
Rob Eger
Tech-X Corporation
Boulder, CO



_______________________________________________
omniORB-list mailing list
omniORB-list@omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list