[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:02:30 CDT 2007
Hi,
Chun Tat David Chu wrote:
> ACE VERSION: 5.6.1
>
Thanks for using the PRF.
> DESCRIPTION:
> I am pretty sure the answer is no base on the information I read on
> TAO Developer's Guide, but figure it doesn't hurt to ask. :-)
>
The simple answer is "no" because if you just pass argc, argv to the
first ORB, it will consume both endpoint arguments, leaving nothing for
the second.
> Currently I've 2 ORBs in my server. Each ORB listen on a different
> port, and in my code I explicity create a "-ORBEndpoint" argument for
> each ORB and pass it to the CORBA::ORB_init() function. This is working
> fine, but I'm wondering if there's a way I can specify my "-ORBEndpoint"
> for my 2 ORBs through command line in my server start-up script.
>
You could do it with application-specific arguments though, preprocess
the argv list to transform one argument into -ORBEndpoint before passing
it to ORB 1, then transform the other argument into -ORBEndpoint before
passing it to ORB 2.
This is generally true for all -ORB* command line arguments, they are
destructively consumed by ORB_init. So if you want to pass any command
line arg to multiple ORBs, you need to keep a local copy of the arg
before calling ORB_init.
HTH,
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