[omniORB] omniORB's ORB::init(..) method.

Ben Miller Ben.Miller@Mercia.Com
Thu, 7 Jun 2001 16:47:48 +0100


Also, according to Henning & Vinoski (Client-Side C++ Mapping 7.8: ORB
Initialization) the third parameter to ORB_init should default to the
empty string.  If this is part of the mapping spec omniORB3 doesn't
comply as it won't compile

CORBA::ORB orb = CORBA::ORB_init(argc, argv);

??

Confused,
Ben.

-----Original Message-----
From: Ben Miller 
Sent: 7 June 2001 16:38
To: 'Duncan Grisby'
Subject: RE: [omniORB] omniORB's ORB::init(..) method. 


Hmm, if I pass an empty string ("") as the third parameter like this:

CORBA::ORB orb = CORBA::ORB_init(argc, argv, "");

I get the runtime error:

CORBA::ORB_init failed -- the ORBid () is not omniORB3

But if I use:

CORBA::ORB orb = CORBA::ORB_init(argc, argv, 0);

everything works fine.  Is this correct?

Best regards,
Ben.


-----Original Message-----
From: Duncan Grisby [mailto:dgrisby@uk.research.att.com]
Sent: 7 June 2001 16:28
To: Ben Miller
Cc: 'omniorb'
Subject: Re: [omniORB] omniORB's ORB::init(..) method. 


On Thursday 7 June, Ben Miller wrote:

> Doesn't the fact that the ORB::init(..) method requires the third
> parameter to be "omniORB3" make the code non-portable to other ORBs?
> Surely the fact that I've passed in "-ORBid omniORB3" as a command
> line parameter should do the same thing?  Why do I have to specify
> both?

Just miss out the last parameter to ORB_init(), or pass an empty
string (not zero). That should work with all ORBs.

-ORBid should override whatever you pass as the third parameter. If is
failing to do that for you?

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --
Mercia Software Ltd.
Mercia House 
Ashted Lock
Aston Science Park
Birmingham B7 4AZ, UK 
Registered Number: 1868855 (Cardiff) 
Tel: 44 (0)121 359 5096 
Fax: 44 (0)121 359 0375 
Web Site: http://www.mercia.com