Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
CDO Objectivity Simple Example
This example will demonstrate using Objectivity CDO in Eclipse.
Contents
Before You Begin
Install Objectivity CDO explained in the Installation Guide
Getting the Example
- Download the example here
- Import the downloaded zip file into a project by choosing File -> Import -> Existing Project into Workspace
- From there you choose the zip file by Selecting "Select archive file"
- Import all projects in the zip file.
- Now you have the example to run Objectivity CDO for the first time!
Running the Example
- Start the Objectivity CDO Server
- Expand com.objy.example.company.server
- Right Click on CDOObjyServerCompany.launch -> Run As -> CDOObjyServerCompany
- Run the Ingest
- Expand com.objy.example.company.datagen
- Expand src then com.objy.example.company.datagen
- Right Click on DataGeneratorCdoClient -> Run As -> Java Application
- Looking at the Data
- Right Click on CDOObjyCompanyClient.launch in the project, com.objy.example.company.server
- Select Run As -> CDOObjyCompanyClient
- When the new instance of Eclipse finished loading, open the CDO Client Perspective.
- Open a new CDO Session with the following information:
- Server Description: tcp://localhost:2036
- Repository Name: companyrepo
- To Browse, Right click on Session companyrepo -> Select "Open View"
- Expand each folder to see all the data.
How Does it work?
Objectivity CDO Server
The Objectivity CDO server starts using CDOObjyServerCompany.launch. In the configuration, an argument points toward a configuration XML using the following argument: -Dnet4j.config="${resource_loc:/com.objy.example.company.server/rootfiles}"
. The configuration file uses the convention explained in CDO_Objectivity_Store_ConfigFile to connect to the Objectivity Database.