SDSU CS 696 Emerging Technologies: Distributed Objects
Spring Semester, 1998
Using Your Own OrbixWeb Daemon

To Lecture Notes Index
© 1998, All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 21-Apr-98

Contents of Doc 28, Using Your Own OrbixWeb Daemon

  1. References
  2. Using Your Own OrbixWeb Daemon
    1. Step 1 Create Directories
    2. Step 2 Copy OrbixWeb Files
    3. Step 3 Modifying your OrbixData/OrbixWeb.properties
    4. Step 4 Modify Your Environment
    5. Step 5 Creating the standard Commands.
    6. Step 6 Running client and Server.
Running your Own OrbixWebd

References


OrbixWeb Programmer's Guide, IONA Technologies PLC, November 1997, Various parts


Doc 28, Using Your Own OrbixWeb Daemon Slide # 2

Using Your Own OrbixWeb Daemon


I have tested the following out on rohan. I will test them on moria after posting them

Step 1 Create Directories


You need several directories for some Orbix data. You may call it whatever you like. You can place anywhere in your directory structure you like. For these instructions I will call the top level directory OrbixData and place it in my home directory, /home/ma/whitney. So where every you see /home/ma/whitney/OrbixData in the following you need to replace with the location and name of the directory you created.

In the directory OrbixData create a subdirectory called Respository and a subdirectory called NamesRepository

Step 2 Copy OrbixWeb Files


Copy the file:
   /opt/OrbixWeb3.0/classes/OrbixWeb.properties 

to your directory OrbixData

Copy the file:
   /opt/OrbixWeb3.0/config/Repository/NS.imp

to your directory OrbixData/Respository


Doc 28, Using Your Own OrbixWeb Daemon Slide # 3

Step 3 Modifying your OrbixData/OrbixWeb.properties


You need to select two ports to use on both rohan and moria.
One is for IIOP and one for Orbix native protocol. The latter is used by the commands putit, etc.

In your file: OrbixData/OrbixWeb.properties make the following changes:

Find the line:
   OrbixWeb.IT_ORBIXD_IIOP_PORT=1571

Change the port number to the port you will use for IIOP

Find the line:
   OrbixWeb.IT_NS_PORT=1571

Change the port number to the same as your IIOP port above

Find the line:
   OrbixWeb.IT_ORBIXD_PORT=1570

Change the port number to the port you will use for the Orbix native protocol

Find the line:
   OrbixWeb.IT_IMP_REP_PATH=/opt/OrbixWeb3.0/config/Repository

Change the path to the path for your OrbixData/Respository directory. In my case this line will be:
   OrbixWeb.IT_IMP_REP_PATH=/home/ma/whitney/OrbixData/Repository

Find the line:
   OrbixWeb.IT_NAMES_REPOSITORY_PATH=/opt/OrbixWeb3.0/config/NamesRepository

Change the path to the path for your OrbixData/NamesRespository directory.


Doc 28, Using Your Own OrbixWeb Daemon Slide # 4

Step 4 Modify Your Environment


In your classpath add an entry to your OrbixData directory. This MUST come before the /opt/OrbixWeb3.0/classes entry. In my case I have in my .cshrc file:
setenv CLASSPATH  '.:/usr/local/lib/java:/home/ma/whitney/java/classes:/home/ma/whitney/OrbixData:/opt/OrbixWeb3.0/classes'

In your .cshrc file change the line:
   setenv IT_CONFIG_PATH $ORBIXWEB_HOME

by replacing $ORBIXWEB_HOME with the path name of your OrbixData directory. For me this is:


Doc 28, Using Your Own OrbixWeb Daemon Slide # 5

Step 5 Creating the standard Commands.


The commands orbixdj, putit, rmit, pingit, etc. will not work with the new port numbers. They need to be modified.

The command:
java  -Dorbixweb.server_name=IT_daemon -Dorbixweb.server_comms=tcp -Dorbixweb.server_code=xdr   IE.Iona.OrbixWeb.Activator.orbixd -textConsole &

start the OrbixWeb daemon.


Doc 28, Using Your Own OrbixWeb Daemon Slide # 6

For putit, etc. I have created shell scripts in files called putrw, pingrw, etc. The contents are as follows. The files are located in ~whitney/bin on rohan. Either create your own executable shell scripts with the contents below or use the ones in my bin directory. (You should notice a pattern in the files below.)
catrw
#!/bin/sh

args= ; while [ $# -gt 0 ] ; do
    args="$args \"$1\"" ; shift
done

eval java -DOrbixWeb.IT_BIND_USING_IIOP=false IE.Iona.OrbixWeb.Utilities.catit $args
killrw
#!/bin/sh

args= ; while [ $# -gt 0 ] ; do
    args="$args \"$1\"" ; shift
done

eval java -DOrbixWeb.IT_BIND_USING_IIOP=false IE.Iona.OrbixWeb.Utilities.killit $args
lsrw
#!/bin/sh

args= ; while [ $# -gt 0 ] ; do
    args="$args \"$1\"" ; shift
done

eval java -DOrbixWeb.IT_BIND_USING_IIOP=false IE.Iona.OrbixWeb.Utilities.lsit $args
pingrw
#!/bin/sh

args= ; while [ $# -gt 0 ] ; do
    args="$args \"$1\"" ; shift
done

eval java -DOrbixWeb.IT_BIND_USING_IIOP=false IE.Iona.OrbixWeb.Utilities.pingit $args
psrw
#!/bin/sh

args= ; while [ $# -gt 0 ] ; do
    args="$args \"$1\"" ; shift
done

eval java -DOrbixWeb.IT_BIND_USING_IIOP=false IE.Iona.OrbixWeb.Utilities.psit $args
putrw
#!/bin/sh

args= ; while [ $# -gt 0 ] ; do
    args="$args \"$1\"" ; shift
done

eval java -DOrbixWeb.IT_BIND_USING_IIOP=false IE.Iona.OrbixWeb.Utilities.putit $args
rmrw
#!/bin/sh

args= ; while [ $# -gt 0 ] ; do
    args="$args \"$1\"" ; shift
done

eval java -DOrbixWeb.IT_BIND_USING_IIOP=false IE.Iona.OrbixWeb.Utilities.rmit $args


Doc 28, Using Your Own OrbixWeb Daemon Slide # 7

Step 6 Running client and Server.


First make sure that you have your OrbixWeb daemon running.

Compile your client and servers as before

Register your server with putrw as:
putrw WhitneyTest -j -addpath /home/ma/whitney/languages/java/whitney/corba/examples/firstExample/java_output GreeterServer

Now run your server as:
java GreeterServer

and run your client as:
java GreeterClient


visitors since 11-Apr-98