Re: OpenORB.xml question
Ramesh Babu <[email protected]> Mon, 29 Apr 2002 12:22:58 +0530
| Newsgroups | gmane.comp.corba.openorb.devel |
|---|---|
| Organization | AdventNet Inc. |
| Message-ID | <[email protected]> |
Hi Yong Chen,
you can try with for following code
String host = "x.x.x.x"; // your host name
String port = 2001;
Properties p = new Properties();
String pathInfo="corbaloc::" + host +":"+ port + "/NameService";
p.put("InitRef.NameService",pathInfo);
orb = org.omg.CORBA.ORB.init(args,p);
thanks
R.Ramesh Babu
Yong Chen wrote:
> Hi,
>
> I have NameService property in OpenORB.xml as following (as usual)
>
> <profile name="user-mods" >
> <import xlink:href="${openorb.home}config/default.xml#InitRef">
> <property name="NameService"
> value="corbaloc::1.2@localhost:2001/NameService" />
> </import>
> </profile>
>
> What I want to do is to change "localhost" dynamically, meaning the host on
> which the naming service runs is not known until the naming service gets
> started on a machine, so I have to change the 'localhost' in OpenORB.xml to
> the real host name. I can programmatically get the ip address of the host
> after naming service gets started, but how can I programmatically change it
> in OpenORB.xml?
>
> Or when using orb.resolve_initial_reference("NameService"), can I do it as
> following?
>
> orb.resolve_initial_reference("corbaloc::1.2@real_host:2001/NameService")
>
> thanks
> Yong Chen
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [email protected] with a subject of:
> unsubscribe openorb-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of:
unsubscribe openorb-dev