The Community OpenORB - TimeService

Olivier Modica

Michael Rumpf


Table of Contents

Introduction
1. Overview
2. Compilation
3. Installation
4. Configuration
5. Deployment
Starting the time server
Running the TimeService examples
6. Frequently Asked Questions
A. Appendix

Introduction

This document provides all information to download, install, run and test the OpenORB Time Service.

Chapter 1. Overview

The Time Service is specified to provide a way to define time concepts in the CORBA distributed environment. OpenORB Time is a fully compliant implementation of the OMG Time Service.

You need the OpenORB and the Event Service distributions to run the Time Service.

Chapter 2. Compilation

The Time Service distribution contains a Ant script. 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 Time Service, we advise you to enter the following from the command line: 'build.bat' or 'sh build.sh'

You will find the openorb_time-{version}.jar file in the dist directory.

You will find the openorb_time_examples-{version}.jar file in the dist directory.

Chapter 3. Installation

This chapter explains how to install the Time Service. We remind you that OpenORB and OpenORB Event Service must be installed before proceeding to the next steps.

Chapter 4. Configuration

Chapter 5. Deployment

Starting the time server

The CORBA specification does not identify the TimeService as a resolvable object through an initial reference.

The TimeService can be retrieved by resolving the COS/TimeService/TimeService NamingService binding. This will return a reference to the org.omg.CosTime.TimeService interface.

The following code will resolve the TimeService:

org.omg.CORBA.Object obj = orb.string_to_object("corbaname:rir:#COS/TimeService/TimeService");
org.omg.CosTime.TimeService time = org.omg.CosTime.TimeServiceHelper.narrow( obj );
            

The TimerEventHandler can be retrieved by resolving the COS/TimeService/TimerEventHandler NamingService binding. This will return a reference to the org.omg.CosTimerEvent.TimerEventHandler interface.

The following code will resolve the TimerEventHandler:

org.omg.CORBA.Object obj = orb.string_to_object("corbaname:rir:#COS/TimeService/TimerEventHandler");
org.omg.CosTimerEvent.TimerEventHandler timer = org.omg.CosTimerEvent.TimerEventHandlerHelper.narrow( obj );
            

Running the TimeService examples

To launch the example, you first have the Naming Service running.

Then you have to start the Time Service server:

java org.openorb.time.Server

Then start the example:

java simple.SimpleExample

This example connects to the Time Service and displays the current time.

Chapter 6. Frequently Asked Questions

Set

6.1. ?
6.1.

?

!

Appendix A. Appendix