Introduction

First of all, I will illustrate how to set up the environment for Corba programming on .Net platform and then guide you to run the examples included in the package. Up to now, TomORB currently supports Mono and Microsoft .Net framework.

 

Prerequisites (for v1.0)
You need to install the following pacakages in your PC:
On MS-Windows Platform
Install the following packages

Install Microsoft.Net Framework v1.1 SDK. or v2.0 SDK Install J# v1.1 SDK. or install v2.0 SDK along with v2.0 SDK if necessary
Download tomorb distribution files and unzip it into a local hard disk. Not every files you need to download, pick these files you want.

Stable Pacakage
package name description
tomorb_1.0_basic.zip
csharp_1.0_basic.zip
jsharp_1.0_basic.zip
cme1.0_basic_examples.zip
cs_1.0_basic_examples.zip
js_1.0_basic_examples.zip
vb_1.0_basic_examples.zip
tomorb_1.0_runtime_net-1.1.zip
tomorb_1.0_js-runtime_net-1.1.zip

Preview/Unstable packages
package name description
csharp_1.0_extras_src.zip
jsharp_1.0_extras_src.zip
cs_1.0_extras_examples.zip
vb_1.0_extras_examples.zip
js_1.0_extras_examples.zip
dpr_1.0_extras_examples.zip

For mono evironment, download the most up-to-date runtime from Mono web site and install it into your local hard disk.

You may install the following preview/unstable packages. Unzip all the packages you ust downloaded to the same local directory. After that, you will find a subdirectory called tomorb_1.0 that includes the following contents:

    Directory Description
    config
    dist
    csharp
    jsharp
    examples
    licenses Include all the licenses required for TomoRB packages. TomORB is not completely rewritten from scratch, it is necessary to includes the original licenses from the various open sources.
    Idl Include all the offical OMG IDLs, the J2ee Class IDLs and the TomORB IDL files
    Psdl Include all the PSDL files for PSS service.
    Psdl_Idl Include the Idl files for importing IDL files into IR repository.
    test
    third-party

On Unix Platform

Note : Mono 1.2.4 is certified to run TomORB. It is highly recommanded to install this package.

    1. Download the up-to-date Mono package named mono_all.zip from Mono web site and install all packages inside it.
    2. Download the stable package and unzip it into a local hard disk
    3. Install the optional (unstable) pacakges if necessary
Installation Steps (for 1.0)
TBD...
Get Started (for v1.0)
TBD...
Prerequisites (for v1.0b1)

You need to install the following pacakages in your PC:

On MS-Windows Platform

Install the following packages

    1. Install Microsoft.Net Framework v1.1 SDK.
    2. Install J# v1.1 SDK.
    3. Download tomorb_bin_<version>.zip and unzip it into a local hard disk
    4. Download mono-1.0.2-gtksharp-1.0.2-win32-0.7.exe from Mono web site and install it into your local hard disk.

You may install the following optional packages:

    1. C# examples - cs_examples_<version>.zip
    2. VB.Net examples - vb_examples_<version>.zip
    3. J# examples - js_examples_<version>.zip
    4. C# Corba sources - csharp_src_<version>.zip
    5. J# Corba sources - jsharp_src_<version>.zip

Note: unzip them and install the files under the directory named tomorb_<version>.

On Unix Platform

Note : Mono 1.1.7 is certified to run TomORB. It is highly recommanded to install this package.

    1. Download the up-to-date Mono package named mono_all.zip from Mono web site and install all packages inside it.
    2. Download tomorb_bin_<version>.zip and unzip it into a local hard disk

Install the following optional pacakges if necessary:

    1. C# examples - cs_examples_<version>.zip
    2. C# Corba sources - csharp_src_<version>.zip
Installation Steps (for 1.0b1)

Under MS-Windows:

  • Install the above packages in your local PC.
  • Copy mono.bat from Mono installation directory into TomORB installation directory tomorb_1.0 and also make one more copy and paste it to tomorb_1.0\dist\mono-1.0\bin.
  • Append the following string to the PATH environment variable:

PATH = %PATH%;<installation directory>\third-party\nant-0.85rc4\bin;

  • Patch NAnt.exe.config to detect Mono libraries - the NAnt configuration file "NAnt.exe.config" located in the "thirty-party\nant-0.85rc4\bin" subdirectory has been patched. However it doesn't support to detect the previous mono packages.
  • Optional step - register strong-named libraries if necessary:

Change to config subdirectory and type the following command:

install-net-library.bat - install C# libraries

Or

install-js-net-library.bat - install J# libraries

Or

install-mono-library.bat - install Mono libraries on MS-Windows

Or

install-mono-library.sh - install Mono libraries on Unix platform

  • Optional Step - Uninstall libraries from Global Assembly Cache (GAC) if necessary:

Change to tomorb_1.0b1/config subdirectory and type the following command:

uninstall-net-library.bat - uninstall C# libraries

Or

uninstall-js-net-library.bat - uninstall J# libraries

Or

uninstall-mono-library.bat - uninstall Mono libraries on MS-Windows

Or

uninstall-mono-library.sh - uninstall Mono libraries on Unix platform

  • Optional Step - Recompile source files

Change to the installation directory and type the following command to re-compile the Corba sources for C#:

NAnt -t:net-1.1 debug strongname cs-build for MS .Net framework

Or

NAnt -t:mono-1.0 strongname cs-build for Mono

Re-compile Corba source for J# if necessary:

NAnt -t:net-1.1 debug strongname js-build

Recompile C# examples if necessary:

NAnt -t:<net-1.1/mono-1.0> debug build-all cs-build-examples

Note: make sure to grant the execution privilege for mono.sh.

Recompile VB.Net examples if necessary:

NAnt -t:<net-1.1/mono-1.0> debug build-all vb-build-examples

Recompile J# examples if necessary:

NAnt -t:net-1.1 debug build-all js-build-examples

  • Prepare test environment

In order to run the examples provided in the packages. You may type the following command to prepare the testing environment:

For C#

NAnt -t:<net-1.1/mono-1.0> debug cs-build-examples cs-test

For VB.Net

NAnt -t:<net-1.1/mono-1.0> debug cs-build-examples cs-test

For J#

NAnt -t:net-1.1 debug cs-build-examples cs-test

Under Unix Platform:

For Mono-1.1.6.1

download mono-all.zip from Mono web site, and unzip it in a temporary directory. According to my experience, it is painful to install Mono under Unix platform. If you find that a rpm file cannot be installed, try to install the other rpm files until all rpm files have been installed.

For example, to install the core runtime library, type the following command:

rpm -i mono-core-1.1.6.1-ximian.6.1.i686.rpm

You may install the optional TomORB packages, and recompile the Corba sources. If you need to register the TomORB libraries into Mono global Assembly Cache (GAC), follow the similar steps described as above.

 

Get Started (for v1.0b1)

The following paragraph shows you how to run the first Corba program under .Net framework:

  1. Setup the test environment for C# examples:

    NAnt -t:net-1.1 cs-test

    Or

    Type the following command under Unix platform:

    mono <installation directory>/third-party/nant-0.85b1/bin/NAnt.exe -t:mono-1.0 \

    cs-test

  2. Start naming service

    Change current directory to <installation directory>/dist/net-1.1/bin/

    Type the following command to start naming service

    namesvc.exe c:\NS_Ref

    Or

    Type the following command under Unix platform:

    mono namesvc.exe /root/NS_Ref

  3. Open a new console and change to the current directory to <installation directory>/test/net-1.1/csharp/ 
  4. Start the Corba server program:

    any-server.exe or mono any-server.exe

    Note: While running in Unix platform, remember to change the NameService setting inside tomorb_config.xml in order to let the Corba server to locate the naming service.

    <E>ORBInitRef.NameService=file:///root/NS_Ref</E>

  5. Open another console and change to the current directory to <installation directory>/test/net-1.1/csharp/
  6. Start the Corba client program:

any-client.exe or mono any-client.exe

Note: While running in Unix platform, remember to change the NameService setting inside tomorb_config.xml in order to let the Corba server to locate the naming service.

<E>ORBInitRef.NameService=file:///root/NS_Ref</E>

When you run the Corba program, a configuration file named "tomorb_config.xml" should be put in the same application directory. This file is used to configure TomORB libraries. It also instructs the Corba ORB where to locate the required libraries dynamically.

There is a sample configuration file located under config subdirectory. One file is for J#, and the other one is for VB.Net and C#.

Most of the settings in the configuration file are migrated from JacORB property file. These meaning of these settings will be documented later.

 

Compile IDL Script

A Corba IDL Compiler is included in the package:

tomorb_1.0b1\dist\net-1.1\js-bin\idl2.exe

However it depends on J# libraries, that means J# runtime must be installed in your PC.

In order to compile Idl script, type the following command:

idl2c.exe -I . -lang <CS/VB/JS> idl_script_file_name.idl

For Mono or .Net platform, an experimental C# Idl Compiler is incuded in the following path:

tomorb_1.0b1\dist\<net-1.1/mono-1.0>\bin\idl2nc.exe

You may type the following command to compile Idl script:

idl2nc.exe -I . -lang <CS/VB/JS> idl_script_file_name.idl

You may create an NAnt script to automate this compilation process,

refer the following web page in detail: Create an NAnt Script

TomORB Utilities

There are many command tools available in TomORB, check the following web pages for detail.

Command Line Tools (stable)

Command LIne Tools (unstable)

Known Bugs

The following known bugs related to Mono 1.1.16 and 1.1.17.x (tested on Sept 30, 2006)

  1. The performance of Garbege Collection is quite different from Microsoft runtime. The Corba client should call Org.Omg.CORBA.ORB.Shutdown method to clean up any outstanding connection before the program exits

The following known bugs related to Mono 1.1.8.x (tested on July 1, 2005)

  1. Serious network socket problem found. This version is not recommanded for running TomORB

The following known bugs are related to Mono 1.0.4/Mono 1.0.5 on Win32 platform only:

  1. Unicode characters cannot be displayed correctly.  This a way to solve the problem, compile the input files with a specified codepage flag.  However, this solution is not fully tested.
  2. "TcpClient" class object doesn't take care of recieve/send timeout property, always raise Timeout I/O exception if no data is available in the socket buffer. (Mono bug# 70850
  3. Mono doesn't take care of the application settings inside "<application name>.config". (Mono bug # 57612)

All the following bugs are related to Mono 1.0.2 (All platform):

  1. Unicode characters cannot be displayed correctly.
  2. "TcpClient" class object doesn't take care of read/write timeout property, always raise Timeout I/O exception if no data is available in the socket buffer.
  3. Mono doesn't take care of the application settings inside "<application name>.config".
  4. In Benchmark example, running the octet server program suffers memory leakage.

All the following bugs are related to Microsoft .Net Framework 1.1 (Win32):

  • No known bugs found

All the following bugs are related to Microsoft .Net Framework 2.0  (tested on Aug 22, 2006)

  • No known bugs found