The Community OpenORB - ConcurrencyService

Marina Daniel

Michael Rumpf


Table of Contents

Introduction
1. Overview
2. Compilation
3. Installation
4. Configuration
5. Deployment
How to build and launch the OpenORB CSS example
6. Frequently Asked Questions
A. Appendix

Introduction

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

Chapter 1. Overview

The OpenORB Concurrency Service (CCS) is a fully compliant implementation of the Concurrency Service specified by the OMG. The purpose of the Concurrency Service is to monitor concurrent access to an object. It enables multiple clients to coordinate their access to shared resources. The Concurrency Service coordinates concurrent use of a resource using locks. A lock represents the ability of a specific client to access a specific resource.

You need the OpenORB distribution to run the OpenORB Concurrency Service.

Each lock is associated with a single resource and a single client.

The Concurrency Service defines several lock modes, which correspond to different categories of access. It also defines intention locks that support locking at multiple levels of granularity. The Concurrency Service defines a lock set, which is a collection of locks associated with a single resource.

The Concurrency Service provides Read (R), Write (W), Upgrade (U), Intention Read (IR), Intention Write (IW) lock modes.

The service will grant a lock if there are no conflict to access the resource. The decision to grant a lock depends on the modes of locks held or requested.

Read locks conflict with write locks and Write locks conflict with other write locks.

An Upgrade mode lock is like a read mode lock that conflict with itself.

Here is the Lock Mode Compatibility table :

Chapter 2. Compilation

The Concurrency Service distribution contains an Ant script. Several dependencies are required and located in the lib directory. If you use the build.bat (for windows) or build.sh (for unix) all dependencies and required classpath are directly used.

Thus, to compile the OpenORB Concurrency Service, we advise you to enter the following command from the command line: build or sh build.sh You will find the openorb_ccs-{version}.jar file in the dist directory.

Chapter 3. Installation

Chapter 4. Configuration

Chapter 5. Deployment

How to build and launch the OpenORB CSS example

If you have built the Transaction Service with the build or sh build.sh command, the Concurrency Service examples are already built. You will find the examples-{version}.jar file in the dist directory of the Concurrency Service distribution. Otherwise, use the following command to build the OTS examples: build examples To launch the example, you first have to launch the naming service: java org.openorb.util.MapNamingContext or if you are using the OpenORB Extended Naming Service : java org.openorb.ins.Server (both with -default or -ORBPort=XXXX where XXXX=naming port number). Then launch the Concurrency Service: java org.openorb.ccs.Server And finally, launch the example : java org.openorb.ccs.examples.CCSClient Here is the graphical interface you can use to test the Concurrency Service:

You can launch several clients, and graphically see the status of the resource you can specify in the Resource Name field. For each resource, you can lock, unlock or try-lock in whatever lock modes you want (Read, Write, Upgrade, Intention Read, Intention Write). If you try locking a resource that is not available, your client test will wait until it becomes available.

Chapter 6. Frequently Asked Questions

Set

6.1. ?
6.1.

?

!

Appendix A. Appendix