Problem:
- Product Name: VisiBroker
- Product Version: 5.x and above
- Product Component: ORB
- Platform/OS Version: All
In the situation where an application wishes to access the NameService we supply the initial reference via the command-line:
-DORBinitRef=NameService=iioploc://hostname:port/NameService
If we also wanted the same application to access the Time Service, and to initialise the Time Service via:
org.omg.CosTime.TimeService timeSvc = org.omg.CosTime.TimeServiceHelper.narrow( orb.resolve_initial_references("CosTimeService"));
In this situation we also need to supply the Time Service via an ORBInitRef (we do not want to use the OSAgent). However it does not seem possible to have multiple ORBInitRef's in an application.
Is there any way to specify multiple ORBInitRef's ?
Resolution:
You can use multiple ORBInitRef's separated by a semi-colon, i.e.:
vbj -DORBInitRef=NameService=corbaloc::hostname1:port1/NameService;CosTimeService=corbaloc::hostname2:port2/CosTimeService MyApp
Alternatively you could use the ORBDefaultInitRef option to specify the Naming Service location and the ORBInitRef for the Time Service i.e.:
vbj -DORBDefaultInitRef=corbaloc::hostname1:port1 -DORBInitRef=CosTimeService=corbaloc::hostname2:port2/CosTimeService MyApp
Now as there is no initial reference for "NameService" the ORB will use the default initial reference (which is pointed to the Naming Service listener address).
#corbaloc
#Security
#ORBInitRef
#NamingService
#TimeService
#ORBDefaultInitRef
#VisiBroker




