OpenCCM - The Persistent State Service

Table of Contents

  1. The OpenCCM Persistent State Service
  2. Demo1 Configuration
  3. Compile the demonstration
  4. Run the demonstration

The OpenCCM Persistent State Service

OpenCCM includes an implementation of the OMG Persistent State Service (PSS) Specification (available as the OMG TC document formal/02-09-06). This PSS implementation provides a compiler for the OMG Persistent State Definition Language (PSDL) and a runtime based on the Java Data Objects (JDO) standard.


To work correctly, the OpenCCM Persistent State Service (PSS) has the following mandatory requirements:

  • A full JDO implementation product,
  • A DataBase manager correctly installed and a created DataBase, and
  • A JDBC driver (JAR file) to connect to your database.

Demo1 Configuration

Move to the demo/pss/demo1 directory.

You have to configure some properties to compile the demonstration. Edit the file and set the following variables:

jdo.license.keyThe license key of the used JDO product.
jdo.driver.nameThe Java class name of the used JDBC driver (e.g. org.postgresql.Driver).
jdo.connection.urlThe URL to connect to your database (e.g. jdbc:postgresql://host/pssdemo1).
jdo.connection.userThe user name to access your database.
jdo.connection.passwordThe user password to access your database.
jdbc.driver.jarThe full path to your JDBC driver Jar file.

Compile the demonstration

To compile the PSS demonstration, do the next steps:

  1. Check that configuration is right.
  2. Execute the following command on Unix systems:


    or on Windows systems:

    $ build.bat

This will:

  • Generate OMG PSDL to Java mappings,
  • Compile OMG IDL and Java source files,
  • Enhance Java classes, i.e. adds JDO persistent code,
  • Then build the demonstration archive.

To create your database schema, i.e. create tables in your database, you can run the following command on Unix systems:

$ build_schema

or on Windows systems:

$ build.bat build_schema

Run the demonstration

Run the server

The server initializes the Persistent State Service, register a Form instance in the CosNaming Service and then wait for requests.

To run the server, execute the following command:

$ bin/run_server

Run the client

The client retrieves the Form instance from the CosNaming Service, and then offers you a menu:

Select a choice :
0. Quit
1. Create a new person
2. Remove a person
3. Display all person's data

You can add a person, display its data or remove it. All this information is stored in the specified database.

To run the client, execute the following command:

$ bin/run_client

If you want to know how to use the PSS API, please have a look to the demonstration source code (in the src/ directory).

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster | Last modified at 2005-07-07 02:04 PM