Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

FAQ Net4j And CDO Getting Started

Revision as of 16:49, 3 April 2006 by Nickb (Talk | contribs) (setup/walkthru using Net4j/CDO)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

(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)

  1. 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.
  2. Install (defaults, but with transactions, 4.11-nt) and start it using winmysqladmin.exe.
  3. Create a user "test" with password "test"
  4. Install the test database (the script is in the org.eclipse.emf.cdo.example.client plugin):
        @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
    
  5. Checkout all plugins from net4j/cdo modules in EMFT (net4j.tests are not needed)
       anonymous@dev.eclipse.org/cvsroot/technology/org.eclipse.emft/net4j
       anonymous@dev.eclipse.org/cvsroot/technology/org.eclipse.emft/cdo
    
  6. Download the Mysql JDBC Driver from http://dev.mysql.com/downloads/connector/j/3.1.html
  7. Copy mysql-connector-java-3.1.12-bin.jar to the lib/ folder of org.eclipse.emf.jdbc.mysql.
  8. Start the launch config CDO Server, an Eclipse headless launch. You should see the startup in the host console.
  9. Start the launch config CDO Client1, an Eclipse IDE launch. You should see the startup in the host console.
  10. 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.)
  11. 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.
  12. 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)

Copyright © Eclipse Foundation, Inc. All Rights Reserved.