java app that needs reference to Naming and Notification - Visibroker how?

java app that needs reference to Naming and Notification - Visibroker how?

Post by ciaran.mch » Wed, 22 Oct 2003 21:08:58



I have never used Visibroker so I don't know for sure that what I am about
to suggest will work... but it *should* work, and if it doesn't then report
it as being a bug in Visibroker.

The CORBA specification defines a few command-line options that all
CORBA products are expected to support. One of these is:

-ORBInitRef <name>=<stringified-ior-or-corbaloc-url>

You can specify multiple -ORBInitRef arguments if you want, for example:

-ORBInitRef NameService=... -ORBInitRef NotificationService=...

These are arguments to the application rather than to the Java interpreter.
So you would use them as:

java com.acme.myClass -ORBInitRef <name1>=... -ORBInitRef<name2>=... ...

Anyway, the point is that if the Visibroker configuration/properites
file is not flexible enough to allow you to specify more than one
<name>=<ior-or-corbaloc-url> entry then you can specify these as
command-line options to your Java program. Of course, you will need to
ensure that the application logic in your Java program ignores all
pairs of command-line arguments of the form "-ORB<something> <something>",
but your Java application should be doing that anyway.


Regards,
Ciaran.
 
 
 

java app that needs reference to Naming and Notification - Visibroker how?

Post by Randy Kin » Wed, 22 Oct 2003 22:37:44


Ciaran McHale wrote:

Ciaran,

Thanks for the info, but we are trying to avoid passing commmand line
parms. Our software baseline (C++ and java) supports Orbix, TAO,
Visibroker, and Jacorb (not to mention Solaris and AIX). Our goal is to
hide the differences between orb vendors. In particular, we find it
saves us time if we don't have to remember the different command line
options for each vendor, so we basically created our own config file for
Corba parameters.

My next approach is to modify the String[] args that are passed to
orb_init. In the case of Visi, I will add the two OrbInitRef parameters
for Naming and Notification to the String[] array, instead of the
Properties. I think that will work, and it will standardize our config
files across vendors.

Thanks,
Randy King