The Community OpenORB - InterfaceRepository

Olivier Modica

Michael Rumpf


Table of Contents

Introduction
1. Overview
2. Compilation
3. Installation
4. Configuration
5. Deployment
How to launch the examples.
How to populate the Interface Repository
6. Frequently Asked Questions
A. Appendix

Introduction

The OpenORB Interface Repository ( IR ) is a fully compliant implementation of the Interface Repository specified by O.M.G. The purpose of the Interface Repository is to store the IDL descriptions of CORBA objects. These descriptions enable clients to get the information to dynamically invoke CORBA objects or to interface with scripting languages. The service defines interfaces associated with the IDL types ( ModuleDef for modules IDL types, AttributeDef for attributes IDL types,... ). These interfaces fully describe the IDL types and take care of inheritance, restrictions and members. The OpenORB Interface Repository relies on a scalable architecture to deal with large numbers of definitions and on a persistence service to store and retrieve the datas.

Chapter 1. Overview

This chapter briefly describes the Interface Repository architecture built on the Portable Object Adapter ( POA ) and the OpenORB Persistent State Service (PSS).

The Interface Repository takes advantage of the POA to ensure that only a limited number of objects will be instanciated in the server. Basically, only one object of each kind (one object for modules, one object for interfaces) is instanciated for every invocations of that kind. That is, even when dealing with large IDL definitions, the IR server won't create many memory-consuming objects.

The IR uses the Persistent State Service (PSS) to provide a flexible and powerful way to store the data. For better performance, a memory connector can be selected as the PSS. This way, the definitions are available for the lifetime of the IR server only. Once the IR server is shut down these descriptions are lost. As the IR relies on the PSS, two extra connectors can be selected by editing the OpenORB XML configuration file. These are the file connectors and the database connector. That is, as an user choice, the IR can be transient (memory connector) or persistent (file or database connector).

Chapter 2. Compilation

You need the OpenORB distribution, the OpenORB Persistent State Service and Transaction Service distributions to run the IR.

The Interface Repository distribution contains an Ant script. Several jars are required and located in the lib directory. If you use the build.bat (for windows) or build.sh (for unix) all required dependencies and classpath are provided.

Thus, to compile the OpenORB Interface Repository, we advise you to enter the following from the command line: build (for windows) or sh build.sh(for unix) You will find the openorb_ir-{version}.jar and the examples-{version}.jar files in the dist directory.

To build the IR plugin, use the following command : build jar-plugin(for windows) or sh build.sh jar-plugin(for unix) You will find the openorb_ir_plugin-{version}.jar file in the dist directory.

Chapter 3. Installation

Chapter 4. Configuration

This chapter explains how to configure the Interface Repository.

The ir.xml is provided in the config directory of your OpenORB Interface Repository distribution. The configuration will be automatically loaded by OpenORB, however if you want to customize it you may do so and then use setConfig.bat (under Windows) and sh setConfig.sh (under Unix) to update the configuration.

        <module name="ir">
        <import xlink:href="${openorb.home}config/pss.xml#pss" />
        <property name="repositoryName" value="MyRepository"/>
        <property name="persistenceType" value="Memory"/>
        </module>
        
The property repositoryName specifies a name for the repository. That means that several repositories may co-exist in the same system.

The property persistenceType specifies the persistence for the repository. If set to "Memory" the repository will be transient. That is, the IDL definitions won't be kept persistent. If set to "File" or "Database", the repository will keep all the IDL definitions persistently.

Chapter 5. Deployment

How to launch the examples.

To launch the example, you first have to launch the Naming Service and the Interface Repository server: java org.openorb.util.MapNamingContext -ORBPort=2001 (port depending on the configuration) java org.openorb.ir.Server Then start the example : java org.openorb.ir.examples.Example1 This example uses the OpenORB IDL compiler to get the IDL definition from Example1.idl, load it into the Interface Repository and then prints the same description from the IR as an HTML file.

How to populate the Interface Repository

The Interface Repository provides a utility to populate the IR from an IDL file. The idl2ir utility takes an IDL file name as argument, the command line should be : idl2ir [idl_file_name]. You have to pass the IDL file name as the argument.

Chapter 6. Frequently Asked Questions

Set

6.1. ?
6.1.

?

!

Appendix A. Appendix