Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] id generation client side & raw replication
[CDO] id generation client side & raw replication [message #1005927] Tue, 29 January 2013 10:31 Go to next message
Ricky de Klerck is currently offline Ricky de KlerckFriend
Messages: 295
Registered: January 2011
Senior Member
Hi,

We're running a small application which uses the master/clone mechanism. Our EMF model only holds one object named 'Person' with the attributes 'id', 'firstName' and 'lastName'. The property 'id' of the attribute 'id' holds the value 'true'. But when saving this id is always '0' in the database.

I thought when setting the property 'ID_GENERATION_LOCATION' to 'CLIENT', the id should be generated.. Or does this only apply to the attribute 'CDO_ID'? If that's true I should use that one I suppose..

We also have a problem when 'raw replication' is set to true. When starting the clone it keeps making new sessions with the message 'replication failed, retry in 2 seconds'. Shouldn't I use 'raw replication'?

Thanks in advance.

Regards,
Ricky
Re: [CDO] id generation client side & raw replication [message #1005936 is a reply to message #1005927] Tue, 29 January 2013 10:50 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 29.01.2013 11:31, schrieb Ricky de Klerck:
> Hi,
>
> We're running a small application which uses the master/clone mechanism. Our EMF model only holds one object named
> 'Person' with the attributes 'id', 'firstName' and 'lastName'. The property 'id' of the attribute 'id' holds the value
> 'true'. But when saving this id is always '0' in the database.
>
> I thought when setting the property 'ID_GENERATION_LOCATION' to 'CLIENT', the id should be generated.. Or does this
> only apply to the attribute 'CDO_ID'?
Yes ;-)

> If that's true I should use that one I suppose..
>
> We also have a problem when 'raw replication' is set to true. When starting the clone it keeps making new sessions
> with the message 'replication failed, retry in 2 seconds'.
But not in normal replication mode? That's weird. I'd need more details about your problem to be able to judge.

> Shouldn't I use 'raw replication'?
Raw replication is the default now:

377721: Make raw replication the default replication
https://bugs.eclipse.org/bugs/show_bug.cgi?id=377721

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] id generation client side & raw replication [message #1005942 is a reply to message #1005936] Tue, 29 January 2013 11:19 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de KlerckFriend
Messages: 295
Registered: January 2011
Senior Member
Eike Stepper wrote on Tue, 29 January 2013 05:50
Am 29.01.2013 11:31, schrieb Ricky de Klerck:

> If that's true I should use that one I suppose..
>
> We also have a problem when 'raw replication' is set to true. When starting the clone > it keeps making new sessions
> with the message 'replication failed, retry in 2 seconds'.
> But not in normal replication mode? That's weird. I'd need more details about your
> problem to be able to judge.


In normal replication there are no errors indeed.

I'm using your master/clone test code. What do you need to judge the problem?

I enabled tracing and this a part of the output:

CDORepositorySynchronizer [debug.repository] Connected to master.
CDORepositorySynchronizer [debug.repository] Synchronizing with master...
CDORepositorySynchronizer [debug.protocol] Writing CDOIDObject of subtype 4 (UUID)
net4j-Thread-2 [debug.protocol] Reading CDOIDObject of sub type 4 (UUID)
CDORepositorySynchronizer [debug] Registering http://www.eclipse.org/emf/CDO/Eresource/4.0.0 --> org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl@6c522a (name: eresource) (nsURI: http://www.eclipse.org/emf/CDO/Eresource/4.0.0, nsPrefix: eresource)
CDORepositorySynchronizer [debug] Registering http://model/1.0 --> smartapps.smartstore.emf.model.impl.ModelPackageImpl@15faadb (name: model) (nsURI: http://model/1.0, nsPrefix: model)
CDORepositorySynchronizer [debug.repository] Replication attempt failed. Retrying in 2 seconds...
CDORepositorySynchronizer [debug.repository] Disconnected from master.
Re: [CDO] id generation client side & raw replication [message #1005949 is a reply to message #1005942] Tue, 29 January 2013 11:39 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 29.01.2013 12:19, schrieb Ricky de Klerck:
> Eike Stepper wrote on Tue, 29 January 2013 05:50
>> Am 29.01.2013 11:31, schrieb Ricky de Klerck:
>>
>> > If that's true I should use that one I suppose..
>> >
>> > We also have a problem when 'raw replication' is set to true. When starting the clone > it keeps making new
>> sessions > with the message 'replication failed, retry in 2 seconds'. > But not in normal replication mode? That's
>> weird. I'd need more details about your > problem to be able to judge.
>
>
> In normal replication there are no errors indeed.
>
> I'm using your master/clone test code. What do you need to judge the problem?
Hard to tell exactly. The exception that causes the log message would be a good start.


>
> I enabled tracing and this a part of the output:
>
> CDORepositorySynchronizer [debug.repository] Connected to master.
> CDORepositorySynchronizer [debug.repository] Synchronizing with master...
> CDORepositorySynchronizer [debug.protocol] Writing CDOIDObject of subtype 4 (UUID)
> net4j-Thread-2 [debug.protocol] Reading CDOIDObject of sub type 4 (UUID)
> CDORepositorySynchronizer [debug] Registering http://www.eclipse.org/emf/CDO/Eresource/4.0.0 -->
> org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl@6c522a (name: eresource) (nsURI:
> http://www.eclipse.org/emf/CDO/Eresource/4.0.0, nsPrefix: eresource)
> CDORepositorySynchronizer [debug] Registering http://model/1.0 -->
> smartapps.smartstore.emf.model.impl.ModelPackageImpl@15faadb (name: model) (nsURI: http://model/1.0, nsPrefix: model)
Is it possible that you add/commit new packages after the initial replication? Unfortunately that's not supported!

Cheers
/Eike

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


> CDORepositorySynchronizer [debug.repository] Replication attempt failed. Retrying in 2 seconds...
> CDORepositorySynchronizer [debug.repository] Disconnected from master.
Re: [CDO] id generation client side & raw replication [message #1005955 is a reply to message #1005949] Tue, 29 January 2013 12:03 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de KlerckFriend
Messages: 295
Registered: January 2011
Senior Member
Eike Stepper wrote on Tue, 29 January 2013 06:39
Am 29.01.2013 12:19,
> I'm using your master/clone test code. What do you need to judge the problem?
> Hard to tell exactly. The exception that causes the log message would be a good
> start.

>
> I enabled tracing and this a part of the output:
>
> CDORepositorySynchronizer [debug.repository] Connected to master.
> CDORepositorySynchronizer [debug.repository] Synchronizing with master...
> CDORepositorySynchronizer [debug.protocol] Writing CDOIDObject of subtype 4 (UUID)
> net4j-Thread-2 [debug.protocol] Reading CDOIDObject of sub type 4 (UUID)
> CDORepositorySynchronizer [debug] Registering http://www.eclipse.org/emf/CDO/Eresource/4.0.0 -->
> org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl@6c522a (name: eresource) (nsURI:
> http://www.eclipse.org/emf/CDO/Eresource/4.0.0, nsPrefix: eresource)
> CDORepositorySynchronizer [debug] Registering http://model/1.0 -->
> smartapps.smartstore.emf.model.impl.ModelPackageImpl@15faadb (name: model) (nsURI: http://model/1.0, nsPrefix: model)
Is it possible that you add/commit new packages after the initial replication? Unfortunately that's not supported!


But there is no real exception, only the messages in the tracing log..

The first time I launch the application everything works fine. The second time the problem starts.. I'm launching the exact same code though.
Re: [CDO] id generation client side & raw replication [message #1005961 is a reply to message #1005949] Tue, 29 January 2013 12:13 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de KlerckFriend
Messages: 295
Registered: January 2011
Senior Member
Eike Stepper wrote on Tue, 29 January 2013 06:39
Am 29.01.2013 12:19, schrieb Ricky de Klerck:
> Eike Stepper wrote on Tue, 29 January 2013 05:50
>> Am 29.01.2013 11:31, schrieb Ricky de Klerck:
>>
>> > If that's true I should use that one I suppose..
>> >
>> > We also have a problem when 'raw replication' is set to true. When starting the clone > it keeps making new
>> sessions > with the message 'replication failed, retry in 2 seconds'. > But not in normal replication mode? That's
>> weird. I'd need more details about your > problem to be able to judge.
>
>
> In normal replication there are no errors indeed.
>
> I'm using your master/clone test code. What do you need to judge the problem?
Hard to tell exactly. The exception that causes the log message would be a good start.


>
> I enabled tracing and this a part of the output:
>
> CDORepositorySynchronizer [debug.repository] Connected to master.
> CDORepositorySynchronizer [debug.repository] Synchronizing with master...
> CDORepositorySynchronizer [debug.protocol] Writing CDOIDObject of subtype 4 (UUID)
> net4j-Thread-2 [debug.protocol] Reading CDOIDObject of sub type 4 (UUID)
> CDORepositorySynchronizer [debug] Registering http://www.eclipse.org/emf/CDO/Eresource/4.0.0 -->
> org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl@6c522a (name: eresource) (nsURI:
> http://www.eclipse.org/emf/CDO/Eresource/4.0.0, nsPrefix: eresource)
> CDORepositorySynchronizer [debug] Registering http://model/1.0 -->
> smartapps.smartstore.emf.model.impl.ModelPackageImpl@15faadb (name: model) (nsURI: http://model/1.0, nsPrefix: model)
Is it possible that you add/commit new packages after the initial replication? Unfortunately that's not supported!

Cheers
/Eike

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


> CDORepositorySynchronizer [debug.repository] Replication attempt failed. Retrying in 2 seconds...
> CDORepositorySynchronizer [debug.repository] Disconnected from master.


Hmm.. I must have done something wrong because I copied your code again and now it works fine. My mistake..

[Updated on: Tue, 29 January 2013 12:14]

Report message to a moderator

Re: [CDO] id generation client side & raw replication [message #1005965 is a reply to message #1005961] Tue, 29 January 2013 12:22 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 29.01.2013 13:13, schrieb Ricky de Klerck:
> Eike Stepper wrote on Tue, 29 January 2013 06:39
>> Am 29.01.2013 12:19, schrieb Ricky de Klerck:
>> > Eike Stepper wrote on Tue, 29 January 2013 05:50
>> >> Am 29.01.2013 11:31, schrieb Ricky de Klerck:
>> >>
>> >> > If that's true I should use that one I suppose..
>> >> >
>> >> > We also have a problem when 'raw replication' is set to true. When starting the clone > it keeps making new >>
>> sessions > with the message 'replication failed, retry in 2 seconds'. > But not in normal replication mode? That's >>
>> weird. I'd need more details about your > problem to be able to judge.
>> >
>> >
>> > In normal replication there are no errors indeed.
>> >
>> > I'm using your master/clone test code. What do you need to judge the problem?
>> Hard to tell exactly. The exception that causes the log message would be a good start.
>>
>>
>> >
>> > I enabled tracing and this a part of the output:
>> >
>> > CDORepositorySynchronizer [debug.repository] Connected to master.
>> > CDORepositorySynchronizer [debug.repository] Synchronizing with master...
>> > CDORepositorySynchronizer [debug.protocol] Writing CDOIDObject of subtype 4 (UUID)
>> > net4j-Thread-2 [debug.protocol] Reading CDOIDObject of sub type 4 (UUID)
>> > CDORepositorySynchronizer [debug] Registering http://www.eclipse.org/emf/CDO/Eresource/4.0.0 --> >
>> org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl@6c522a (name: eresource) (nsURI: >
>> http://www.eclipse.org/emf/CDO/Eresource/4.0.0, nsPrefix: eresource)
>> > CDORepositorySynchronizer [debug] Registering http://model/1.0 --> >
>> smartapps.smartstore.emf.model.impl.ModelPackageImpl@15faadb (name: model) (nsURI: http://model/1.0, nsPrefix: model)
>> Is it possible that you add/commit new packages after the initial replication? Unfortunately that's not supported!
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>> > CDORepositorySynchronizer [debug.repository] Replication attempt failed. Retrying in 2 seconds...
>> > CDORepositorySynchronizer [debug.repository] Disconnected from master.
>
>
> Hmm.. I musst hace done something wrong because I copied your code again and now it works fine. My mistake..
Does that mean that this thread is "closed"? Good ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] id generation client side & raw replication [message #1006002 is a reply to message #1005965] Tue, 29 January 2013 14:18 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de KlerckFriend
Messages: 295
Registered: January 2011
Senior Member
Yes it is. How can I close the topic? I still have another problem but I will open a new topic for it. Thanks!
Re: [CDO] id generation client side & raw replication [message #1006059 is a reply to message #1006002] Tue, 29 January 2013 16:31 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 29.01.2013 15:18, schrieb Ricky de Klerck:
> Yes it is. How can I close the topic?
You can't. I just wanted to be sure that I can close it *mentally* :P

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:Ecore with nested, Inner Class
Next Topic:[CDO] Get locked_areas from CDO
Goto Forum:
  


Current Time: Wed Nov 26 03:34:34 GMT 2014

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

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