CDO Objectivity Store Quick Start
The quick start of the CDO Objectivity Store takes you through the following steps:
- Download and install
- download example projects
- start the Objectivity/DB lockserver.
- start the CDO Server
- run client side junit tests to see interaction between the client and server
Download and install
Download the required software:
- Eclipse 3.6 (Helios)
- EMF 2.6, is normally included with the java EE version of Eclipse
- CDO: use the Eclipse update manager with the following update site: http://download.eclipse.org/modeling/emf/cdo/updates/3.0, select the CDO Server feature
- Objectivity/DB: download an evaluation copy of release 10.0 from the following site: https://download.objectivity.com/approved.aspx
Install Eclipse and the plugins, see: Eclipse p2 getting started.
Creating the Objectivity DB Store
After installing Objectivity/DB, you need to create a plug-in project to export Objectivity's functionality.
- From Eclipse, go File->Project
- Expand the Plug-in Development Folder
- Choose Plug-in from Existing JAR Archives then click "Next >"
- Click "Add External"
- Goto <Objectivity Install Directory>\lib and select oojava.jar
- Click "Open"
- Click "Next"
- Name the project in the Project name text box
- Uncheck "Unzip the JAR archive into the project"
- Click "Finish"
- Open the MANIFEST.INF in the newly created project's META-INF folder
- Select the Runtime tab
- Select all the components being exported
- Click "Properties..."
- Update version number to "3.0.0"
Now the Objectivity CDO plugin has the necessary component it needs to run an Objectivity CDO server.
Download the example projects
After installing Eclipse, the plugins, and Objectivity/DB start Eclipse go here to get an CDO Objectivity example
Start the Objectivity/DB lockserver
If you are using Objectivity/DB on Windows, the lockserver is started as a service, to make sure a valid lockserver is running use the following command.
On linux you'll need to start the lockserver yourself, to do so...
(note: in the near future, we'll allow Objectivity Store to use an internal lockserver if one is not available, hence simplify this part of the process)
Start the CDO server
Make sure that the configuration file is using proper directory and file names for your platform.
To start the CDO server open the org.eclipse.emf.cdo.objectivity.server project and right-click on the CDOObjyServer.launch and then: Run As > CDOObjyServer.
Check the console view, after 5-10 seconds you should see:
main [debug.lifecycle.dump] DUMP TCPAcceptor@20 Acceptor.config = TransportConfig[receiveExecutor=java.util.concurrent.ThreadPoolExecutor@46f93, bufferProvider=BufferPool[4,096], protocolProvider=org.eclipse.net4j.ContainerProtocolProvider$Server@139358c, negotiator=null] Acceptor.connectorListener = org.eclipse.spi.net4j.Acceptor$1@ea9bc8 Acceptor.acceptedConnectors = selector = TCPSelector startSynchronously = true synchronousStartTimeout = 20000 serverSocketChannel = sun.nio.ch.ServerSocketChannelImpl[/0.0.0.0:2036] address = 0.0.0.0 port = 2036 [INFO] Net4j extension started [INFO] CDO server started Application Started: 8521
As a default the CDO Hibernate server uses hsqldb.
For your info, the CDO server uses the config file: cdo-server.xml in the config directory in the org.eclipse.emf.cdo.examples.hibernate.server project.
Run client side code
< need editing...>
Quick Next Steps
The CDO Server uses the configuration file at (...) by default. org.eclipse.emf.cdo.examples.objectivity.server/config.
As a next step create your own junit test case in the org.eclipse.emf.cdo.examples.objectivity.client project, extend the BaseTest class in that same plugin.
You can also try the standard CDO View.