IDL interface for the Bank.
prompt> nameserv -VBJprop ORBpropStorage=ns.properties >ns.ior &
This will startup the NameService with the default backing store InMemory and the default name "NameService". The IOR will be captured in the file ns.ior for later use.
Alternatively, you can start any other NameService, e.g. the tnameserv
executable that comes with JDK 1.2. Please note that you can use corbaploc
and corbaname scheme only with a NameService that fully implements the
INS specification (orbos/98-10-11 or newer)!
You would start the jdk 1.2 NameService as follows. It will print out
its IOR, which you will have to copy in a file named ns.ior
prompt> tnameserv -ORBInitialPort 9999
&
prompt> vbj -Dvbroker.agent.enableLocator=false -DORBInitRef=NameService=corbaloc::localhost:9999/NameService Server&
The first example will specify the location of the NameService by passing in an IOR.
prompt> vbj -DORBInitRef=NameService=`cat ns.ior` ClientThe second example will specify the location of the NameService by pointing to the host and port number, on which the NameService is listening. Please note that the object key "NameService" has to be used regardless of which name we give the NameService instance on the commandline.
prompt> vbj -DORBInitRef=NameService=corbaloc::localhost:9999/NameService ClientThe third example will specify the location of the NameService by pointing to the host and port number, on which the NameService is listening and a stringified name with which the object is registered. Since the server registered on the root context, this name is only the slash.
prompt> vbj -DORBInitRef=NameService=corbaname::localhost:9999/ ClientAll previous protocols (IOR, corbaloc, corbaname) are mandatory, according to the INS specification. VisiBroker also implements the optional protocols "file://", "http:", and "ftp:", to obtain an IOR. Their use is presented in the following three examples.
The first example will specify the location of the NameService by pointing to a file containing an IOR.
prompt> vbj -DORBInitRef=NameService=file:ns.ior ClientThe second example will specify the location of the NameService by pointing to a file on a webserver containing an IOR. You will have to copy the ns.ior file to a webserver to try this example.
prompt> vbj -DORBInitRef=NameService=http://<your location>/ns.ior ClientThe third example will specify the location of the NameService by pointing to a file on a ftp server containing an IOR. You will have to copy the ns.ior file to the ftp server to try this example.
prompt> vbj -DORBInitRef=NameService=ftp://<your location>/ns.ior Client