[Ace-users] Re: [tao-users] Can you set -ORBEndpoint for multiple ORBs in command line

Phil Mesnier mesnier_p at ociweb.com
Thu Sep 27 10:20:31 CDT 2007


Hi Matt,

Matthew Gillen wrote:
> Although if want to live dangerously, you might note exactly how the arguments
> are "consumed": you'll notice that you can just save the value of argc, and
> use the same argv again and again.  The argv parameters are reordered by
> ORB_init, and argc is decremented to make it look like they "consumed"
> arguments are gone (that's why argc is passed by reference!).
> 
> Of course this technique is based on an implementation detail of TAO, not on a
> spec of any sort, so nothing is guaranteed about this technique w.r.t.
> portability to other ORBs, or future versions of TAO, etc.
> 
> But it's a neat trick if you're just writing some throw-away test app.
> 

You are technically correct, but I would advise against this sort of 
trick because
  1) It relies on an internal implementation detail of the ORB, which is 
not documented and subject to change, and may be implemented differently 
based on internal configuration.
  2) Some argument values cannot be reused, such as -ORBEndpoint. If you 
pass the same endpoint args to 2 ORBs, the second one will fail to 
initialize, raise an exception and then be in a world of hurt.

Regards,
Phil

-- 
Phil Mesnier
Principal Software Engineer,    http://www.ociweb.com
Object Computing, Inc.          +01.314.579.0066



More information about the Ace-users mailing list