Difference between revisions of "FAQ Net4j And CDO Getting Started"
(setup/walkthru using Net4j/CDO)
Latest revision as of 15:49, 3 April 2006
(This document is a draft. Please contribute to it so that it can grow and mature!)
The example has a fancy UI now with a generic CDOEditor and a CDOExplorer view to browse all remote resources. The editor has a special LoadResourceDialog.
 Getting started (walkthru)
- Download mysql from http://dev.mysql.com/downloads/mysql/5.0.html. I use 4.11-nt, but 5.0 should also work. Will test that later.
- Install (defaults, but with transactions, 4.11-nt) and start it using winmysqladmin.exe.
- Create a user "test" with password "test"
- Install the test database (the script is in the
@echo off set USER=test set PASSWORD=test set DATABASE=cdoTest mysql -u %USER% -p%PASSWORD% -e "drop database if exists %DATABASE%; create database %DATABASE%" mysql
- Checkout all plugins from net4j/cdo modules in EMFT (net4j.tests are not needed)
- Download the Mysql JDBC Driver from http://dev.mysql.com/downloads/connector/j/3.1.html
- Copy mysql-connector-java-3.1.12-bin.jar to the lib/ folder of org.eclipse.emf.jdbc.mysql.
- Start the launch config CDO Server, an Eclipse headless launch. You should see the startup in the host console.
- Start the launch config CDO Client1, an Eclipse IDE launch. You should see the startup in the host console.
- In the client, open the view CDO Explorer. It is empty for now. Here you can create new CDO resources. The explorer doesn't visually react on new resources for the moment. To see them in the view you have to restart the client. (I will fix that soon.)
- To have 2 initially populated remote resources, you can also hit the first of the ugly Eclipse buttons Create Library CDO Resources. Again you have to restart the client in order to see the new resources in the view. This demonstrates that resources can be committed to the db.
- You can open the CDOEditor by double clicking into the CDOExplorer viewer. Other resources can be loaded with Load Resource.... When you hit Save, a transactional commit happens for the whole ResourceSet. Only changes are committed and other clients are notified over the net so that they can update their UI.
(posted by Nick Boldt 16:49, 3 April 2006 (EDT) on behalf of Eike Stepper)