Horus Doc || Corba Reference || Corba   Client Server   Stubs C++   Stubs Java   Servant Generator  

Corba configuration

Configuration of connections between Corba components (servers, clients, and Corba services) relies on a number of configuration files and environment variables. Assuming you installed Horus correctly, these are already setup.

The main configuration file is ${HXSRC}/HxCorba/cfg/orbacus.cfg. It looks something like this:

#   Copyright (c) 2000, University of Amsterdam, The Netherlands.
#   All rights reserved.
# 
#   Author(s):
#   Marc Navarro            (mnavarro@wins.uva.nl)
 
 
org.omg.CORBA.ORBClass = com.ooc.CORBA.ORB
org.omg.CORBA.ORBSingletonClass = com.ooc.CORBA.ORBSingleton
 
# Naming Service
ooc.naming.port=8001
ooc.naming.database=NS.dat
ooc.naming.endpoint=iiop --port 8001

# Interface Repository (2.3)
ooc.ifr.port=8002
# From 4.1.0 on :
ooc.ifr.endpoint=iiop --port 8002

# Initial references
ooc.orb.service.NameService=corbaloc::localhost:8001/NameService
ooc.orb.service.InterfaceRepository=corbaloc::localhost:8002/DefaultRepository

ooc.orb.service.Constructor=corbaloc::localhost:8010/Constructor
ooc.orb.service.GlobalOps=corbaloc::localhost:8010/GlobalOps
ooc.orb.service.Registry=corbaloc::localhost:8010/Registry
ooc.orb.service.Test=corbaloc::localhost:8010/Test
ooc.orb.service.Configure=corbaloc::localhost:8010/Configure

ooc.orb.service.WebImageFactory=corbaloc::localhost:8011/WebImageFactory
ooc.orb.service.TVCapture=corbaloc::localhost:8020/TVCapture
ooc.orb.service.VideoPlayerFactory=corbaloc::localhost:8020/VideoPlayerFactory

ooc.orb.service.Database=corbaloc::carol.wins.uva.nl:8888/Oracle

The file specifies the default Horus setup to all Corba components. The Orbacus C++ ORB's access the file via the ORBACUS_CONFIG environment variable. Since Java applications do not have access to environment variables we use the ${HXSRC}/HxBin/hxproperties scripts to turn the content of orbacus.cfg into Java properties (Java applets do not have access to the script so they so something like a services.txt).

Of course, you can override the default values of orbacus.cfg via command line arguments, see the examples in this document and the Orbacus manual.

Interface Repository

The Interface Repository (started with irserv) runs at port 8002 as specified in orbacus.cfg. Typically, the Interface Repository is started via the ${HXSRC}/HxBin/ss(.bat) script with ss ir. On Windows, the Horus toolbar contains an icon to call the ss script.

Naming Service

The Naming Service (started with nameserv) runs at port 8001 as specified in orbacus.cfg. The ss script provides two ways to start the Naming Service : with (ss nss) and without (ss ns) creating a new database for its bindings.

Orbacus provides a command line tool (nsadmin) to list the content of the Naming Service and to add new bindings. For example, the following will list the Horus servers (see Horus server) registered in the Naming Service running on the local machine at port 8001 under HxCorba/Servers:

nsadmin -l HxCorba/Servers

To list the Horus servers registered in the Naming Service running on machine Mach2 at port 8001:

nsadmin -l HxCorba/Servers -ORBservice NameService corbaloc::Mach2:8001/NameService

To register the Horus server running on machine Mach2 at port 8010 in the Naming Service running on the local machine under the name Mach2Server:

nsadmin -b HxCorba/Servers/Mach2Server corbaloc::Mach2:8010/Constructor

Note that the context HxCorba/Servers should already exist. You can create it using:

nsadmin -c HxCorba
nsadmin -c HxCorba/Servers


Go to the next section or return to the index.


Generated on Mon Jan 27 15:20:57 2003 for CorbaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001