Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Example cdo-server.xml for a DB store
[CDO] Example cdo-server.xml for a DB store [message #912064] Wed, 12 September 2012 21:56 Go to next message
Mark Rowe is currently offline Mark RoweFriend
Messages: 23
Registered: January 2012
Junior Member
Hi,

Does anyone have a *simple* example of a cdo-server.xml file for a "db" store type (rather than hibernate).

I am using
org.eclipse.emf.cdo.server.product.tcp_h2


and a h2 server.

As a side note, is the main advantage of using Hibernate / Teneo the ability to tweak the table and column names or are there some fundamental advantages?
Re: [CDO] Example cdo-server.xml for a DB store [message #912208 is a reply to message #912064] Thu, 13 September 2012 06:18 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 12.09.2012 23:56, schrieb Mark Rowe:
> Hi,
>
> Does anyone have a *simple* example of a cdo-server.xml file for a "db" store type (rather than hibernate).

This must be one of the simplest config files:

<?xml version="1.0" encoding="UTF-8"?>
<cdoServer>
<acceptor type="tcp" listenAddr="0.0.0.0" port="2036"/>
<repository name="repo1">
<store type="db">
<property name="readerPoolCapacity" value="20"/>
<property name="writerPoolCapacity" value="20"/>
<mappingStrategy type="horizontal">
<property name="qualifiedNames" value="true"/>
</mappingStrategy>
<dbAdapter name="h2"/>
<dataSource class="org.h2.jdbcx.JdbcDataSource" uRL="jdbc:h2:database/repo1"/>
</store>
</repository>
</cdoServer>

>
> I am using org.eclipse.emf.cdo.server.product.tcp_h2
That one is almost identical to the one above.

>
> and a h2 server.
>
> As a side note, is the main advantage of using Hibernate / Teneo the ability to tweak the table and column names or
> are there some fundamental advantages?
I think so but maybe Martin has some more insights...

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Example cdo-server.xml for a DB store [message #912214 is a reply to message #912208] Thu, 13 September 2012 06:33 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hi Mark

for me, the ability to use HQL as query language is a great feature you get with Hibernate.

Greetings
Christoph
Re: [CDO] Example cdo-server.xml for a DB store [message #912219 is a reply to message #912214] Thu, 13 September 2012 06:39 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Mark,
Next to hql another advantage of the hibernate store is that it allows very detailed mapping of your model to the
relational db. This includes using join tables, secondary tables, mapping inheritance structures in different way
(joined, single table, mappedsuperclass).

The hibernate store uses Teneo which has been used for many years and has been used to map hunderds of models automatically.

gr. Martin

On 09/13/2012 08:33 AM, Christoph Keimel wrote:
> Hi Mark
>
> for me, the ability to use HQL as query language is a great feature you get with Hibernate.
>
> Greetings
> Christoph


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [CDO] Example cdo-server.xml for a DB store [message #912222 is a reply to message #912214] Thu, 13 September 2012 06:42 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 13.09.2012 08:33, schrieb Christoph Keimel:
> Hi Mark
>
> for me, the ability to use HQL as query language is a great feature you get with Hibernate.
Oh yeah, that one (or something similar) we'd like to have for DBStore, too.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Example cdo-server.xml for a DB store [message #912321 is a reply to message #912222] Thu, 13 September 2012 10:46 Go to previous messageGo to next message
Mark Rowe is currently offline Mark RoweFriend
Messages: 23
Registered: January 2012
Junior Member
Eike, the config file works beautifully!

Thanks everyone for your very helpful responses. I think that Hibernate / Teneo is the way to go because of HSQL, although I also like the lightness of DBstore (sometimes I think less dependencies == less headaches Rolling Eyes )

For now the CDO adventure continues, I would like to somehow build my own server that runs standalone (RCP) with a GUI displaying things like number of connections, number of records, loading etc. Be warned - more questions to come Very Happy
Re: [CDO] Example cdo-server.xml for a DB store [message #912353 is a reply to message #912321] Thu, 13 September 2012 12:03 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 13.09.2012 12:46, schrieb Mark Rowe:
> Eike, the config file works beautifully!
>
> Thanks everyone for your very helpful responses.
You're welcome ;-)

> I think that Hibernate / Teneo is the way to go because of HSQL, although I also like the lightness of DBstore
> (sometimes I think less dependencies == less headaches :roll: )
Yes, dependencies headache can already start at install time.

> For now the CDO adventure continues, I would like to somehow build my own server that runs standalone (RCP) with a GUI
> displaying things like number of connections, number of records, loading etc. Be warned - more questions to come :d
I see. That's similar to a remote administration front-end but eliminates the need for an additional ISignalProtocol.
You may be insterested in this brand new feature of CDO:

381472: Design a repository administration API
https://bugs.eclipse.org/bugs/show_bug.cgi?id=381472

Currently this API/protocol is mostly concerned about asynchronous repository discovery and remote addition/removal of
repositories. But the idea is clearly that more administrative functionality should be integrated with this simple
framework. Let me know if you're interested to contribute to it.

The CDO server as such should provide all of the hooks/listen points you'll need to implement the server-side admin
functionality. If some are missing just let us know.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Example cdo-server.xml for a DB store [message #912396 is a reply to message #912353] Thu, 13 September 2012 13:54 Go to previous message
Mark Rowe is currently offline Mark RoweFriend
Messages: 23
Registered: January 2012
Junior Member
Hi Eike,

Quote:
Let me know if you're interested to contribute to it.


I should explain that I haven't done any coding (which was previously C++ and Pascal!) for fifteen years and only started looking seriously at Java/Eclipse about four weeks ago Razz. Therefore if I can understand 50% of what you write in your replies I feel I am winning! However I do appreciate all the effort you guys put in and maybe can contribute with requirement definition, documentation or testing.

The good news is I have a running server, running client and a working model with three classes!

I want to play with the class editor more but unfortunately running a second instance of Eclipse clobbers my 1Gb memory.
Previous Topic:[CDO] Problems loading objects from a resource
Next Topic:[CDO] Concurrent Access to Models
Goto Forum:
  


Current Time: Wed Apr 24 17:56:16 GMT 2024

Powered by FUDForum. Page generated in 0.03024 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top