[Top] [Prev] [Next] [Bottom] [Contents]

Starting a Gateway Daemon

Required For All Configurations

To run the ORB for any configuration, the environment must be setup to talk to the desired database vendors. Set the variables for only the Databases you wish to install as follows:

ORB Environment (cshell):

setenv SYBASE sybase_root
setenv ORACLE_SID default_database_name
setenv INFORMIXDIR informix_root

ORB Environment (Bourne or Korn shell):

SYBASE=sybase_root_directory
ORACLE_SID=default_database_name
INFORMIXDIR=informix_root_directory
export SYBASE ORACLE_SID INFORMIXDIR

Daemon On Same Machine As Server Application or Sapphire/Web

The simplest way to start a Gateway Daemon is to start one on the same machine on which you will run the Server Application or Sapphire/Web. For this configuration, do this:

dborbd.sh&
To start Sapphire/Web so it talks to this Gateway, do this:

saweb.sh&
To configure Server Applications to talk to this Gateway, you don't need to do anything, as long as the Server Application and Gateway are to run on the same machine.

Daemon On Different Machine Than Server Application or Sapphire/Web

Running Sapphire/Web and Server Applications on different machines than your Gateway is very straightforward. For this configuration, do this:

On the machine on which you want the Gateway to run, type:

dborbd.sh&
To start Sapphire/Web so that it talks to this Gateway, execute one of these options:

saweb.sh -Hhostname&
where hostname is the machine's name on which the Gateway was started.

Another way to do it is with environment variables:

C Shell:

setenv ORB_HOST hostname
saweb.sh&
Bourne/Korn Shell:

ORB_HOST=hostname
export ORB_HOST
saweb.sh&
where hostname is the machine's name on which the Gateway was started.

To configure Server Applications to talk to this Gateway, you need to add one line of code to the project's function main. This can be done inside the Project Code Dialog by adding this line of C code to the /* main function Initial Code */ section:

putenv("ORB_HOST=hostname");
where hostname is the name of the machine on which the Gateway was started.

Multiple Daemons On Different Machine Than Server Application or Sapphire/Web

Running multiple Gateway Daemons on the same host is not usually necessary. If you find this is a need, do the following:

On the machine where you want the Gateways to run, type:

dborbd.sh -r10&
dborbd.sh -r20&
You can start as many Gateways as necessary by changing the -r# value to a different integer value less than 100,000 for each instance. The -r# option provides the RPC seed number necessary for the Gateway daemon to communicate with its clients.

To start Sapphire/Web so that it talks to a specific Gateway, do one of these options:

saweb.sh -Hhostname -r10&
where hostname is the machine's name that the Gateway was started on and -r# is the matching seed number of the Gateway you wish to use.

Another way to do it is with environment variables:

C Shell Bourne/Korn Shell
setenv ORB_HOST hostname ORB_HOST=hostname
setenv ORB_SEED 10 ORB_SEED=10
saweb.sh& export ORB_HOST ORB_SEED
saweb.sh&
where hostname is the name of the machine on which the Gateway was started, and the ORB_SEED value is the matching seed number of the Gateway you wish to use.

To configure Server Applications to talk to this Gateway, you need to add two lines of code to the project's function main. This can be done inside the Project Code Dialog by adding these lines of C code to the /* main function Initial Code */ section:

putenv("ORB_HOST=hostname");
putenv("ORB_SEED=10");
where hostname is the machine name on which the Gateway was started and the ORB_SEED value is the matching seed number of the Gateway you wish to use.

When using multiple Gateways on the same machine, it is not necessary to specify the ORB_HOST if Sapphire/Web and the Server Application are run on the same machine as the Gateways.



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.