Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » DAWN and Synchronous Modeling
DAWN and Synchronous Modeling [message #852078] Sat, 21 April 2012 16:52 Go to next message
Siva Raj is currently offline Siva RajFriend
Messages: 7
Registered: January 2012
Junior Member
Hi all,

Is DAWN capable of providing Synchronous Communication? I mean, every edit on the models, need to be synchronized with all the editors which share the same model.
Re: DAWN and Synchronous Modeling [message #852126 is a reply to message #852078] Sat, 21 April 2012 17:58 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 21.04.2012 18:52, schrieb Siva Raj:
> Hi all,
>
> Is DAWN capable of providing Synchronous Communication? I mean, every edit on the models, need to be synchronized
> with all the editors which share the same model.
You can try to play with something like this:

transaction.options().setStaleReferencePolicy(CDOStaleReferencePolicy.PROXY);
transaction.options().setInvalidationPolicy(CDOInvalidationPolicy.RELAXED);
transaction.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
transaction.addTransactionHandler(new CDOPostEventTransactionHandler.Default() {
@Override
protected void modifiedObject(CDOTransaction tx, CDOObject object, Notification msg) {
try {
transaction.commit();
} catch (Exception e) {
System.out.println("Commit problem. Conflicts: " + transaction.getConflicts()); //$NON-NLS-1$
transaction.rollback();
}
}
});

Martin may have more ideas...

Cheers
/Eike

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


Re: DAWN and Synchronous Modeling [message #852158 is a reply to message #852126] Sat, 21 April 2012 18:38 Go to previous messageGo to next message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
I would do it as Eike supposed, but do not forget to call

IDawnEditingSupport.refresh()

to update the UI.

As this has been asked before, could you file a bugzilla? We could add
switch to the generator to generate a synchronous version.

Cheers,

Martin



Am 21.04.2012 19:58, schrieb Eike Stepper:
> Am 21.04.2012 18:52, schrieb Siva Raj:
>> Hi all,
>>
>> Is DAWN capable of providing Synchronous Communication? I mean, every
>> edit on the models, need to be synchronized with all the editors which
>> share the same model.
> You can try to play with something like this:
>
>
> transaction.options().setStaleReferencePolicy(CDOStaleReferencePolicy.PROXY);
>
>
> transaction.options().setInvalidationPolicy(CDOInvalidationPolicy.RELAXED);
>
> transaction.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
> transaction.addTransactionHandler(new
> CDOPostEventTransactionHandler.Default() {
> @Override
> protected void modifiedObject(CDOTransaction tx, CDOObject
> object, Notification msg) {
> try {
> transaction.commit();
> } catch (Exception e) {
> System.out.println("Commit problem. Conflicts: " +
> transaction.getConflicts()); //$NON-NLS-1$
> transaction.rollback();
> }
> }
> });
>
> Martin may have more ideas...
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
Re: DAWN and Synchronous Modeling [message #852664 is a reply to message #852126] Sun, 22 April 2012 07:08 Go to previous messageGo to next message
Siva Raj is currently offline Siva RajFriend
Messages: 7
Registered: January 2012
Junior Member
Dear Eike,

Where should I include this piece of code? Should I have the source?

[Updated on: Sun, 22 April 2012 11:23]

Report message to a moderator

Re: DAWN and Synchronous Modeling [message #853557 is a reply to message #852664] Mon, 23 April 2012 05:55 Go to previous messageGo to next message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
Hi,

insert it at the end of the setInput() method of your editor.

Cheers,

Martin
Re: DAWN and Synchronous Modeling [message #854144 is a reply to message #853557] Mon, 23 April 2012 17:55 Go to previous messageGo to next message
Siva Raj is currently offline Siva RajFriend
Messages: 7
Registered: January 2012
Junior Member
I just followed this link to get started with dawn.

://wiki.eclipse.org/Getting_Started_with_Dawn

I do not have any source in my workspace. But Dawn is working fine now. Where should I insert this piece of code.

[Updated on: Mon, 23 April 2012 17:57]

Report message to a moderator

Re: DAWN and Synchronous Modeling [message #856340 is a reply to message #854144] Wed, 25 April 2012 15:21 Go to previous messageGo to next message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
Hi,

I do not see any link in your post.

Use this tutorial to install the sources:

http://wiki.eclipse.org/CDO_Source_Installation


If you have your own generated editor simply use it's setInput() method.
Otherwise you can play with the example, e.g. the Acore example.

Cheers,

Martin

Am 23.04.2012 19:55, schrieb Siva Raj:
> I just followed this link to get started with dawn. I do not have any
> source in my workspace. Where should I insert this piece of code.
Re: DAWN and Synchronous Modeling [message #862990 is a reply to message #856340] Sun, 29 April 2012 07:53 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
Are you looking for something similar to this?

http://www.mftech.org/dawn/screencasts/9_locking/locking.htm
Re: DAWN and Synchronous Modeling [message #870117 is a reply to message #862990] Sun, 06 May 2012 17:15 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member

[Updated on: Sun, 06 May 2012 19:02]

Report message to a moderator

Re: DAWN and Synchronous Modeling [message #870133 is a reply to message #870117] Sun, 06 May 2012 21:30 Go to previous messageGo to next message
Siva Raj is currently offline Siva RajFriend
Messages: 7
Registered: January 2012
Junior Member
I am done with all the steps for Importing the CDO Source. Now there are some problems in some of the workspace projects.

They are:

1. Most of the dawngenmodel projects
2. cdo.tests projects
3. org.gastro projects

Also, when I try to run the CDO Server I get the following error:

[ERROR] Unknown DB adapter: h2
java.lang.IllegalArgumentException: Unknown DB adapter: h2

What configuration should I run first?
Re: DAWN and Synchronous Modeling [message #870464 is a reply to message #870133] Tue, 08 May 2012 10:52 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 06.05.2012 23:30, schrieb Siva Raj:
> I am done with all the steps for Importing the CDO Source. Now there are some problems in some of the workspace
> projects.
What exactly are these "some problems"?

>
> They are:
>
> 1. Most of the dawngenmodel projects
> 2. cdo.tests projects
> 3. org.gastro projects
>
> Also, when I try to run the CDO Server I get the following error:
>
> [ERROR] Unknown DB adapter: h2
> java.lang.IllegalArgumentException: Unknown DB adapter: h2
You mean the shipped launch config "CDO Server"? Does this launch config validate okay? Are the h2-related plugins
properly deployed?

>
> What configuration should I run first?
In order to do what? Maybe Martin (cc'ed) knows what you're trying to achieve...

Cheers
/Eike

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


Re: DAWN and Synchronous Modeling [message #870482 is a reply to message #870133] Tue, 08 May 2012 11:50 Go to previous messageGo to next message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
> What configuration should I run first?
>

First you need to started the server configuration and then create a new
Eclipse instance for the clients as described here:

http://wiki.eclipse.org/Getting_Started_with_Dawn

But let us first solve your errors. I suggest that you already tried a
"workspace clean"?

Cheers,

Martin
Re: DAWN and Synchronous Modeling [message #872256 is a reply to message #870482] Tue, 15 May 2012 19:25 Go to previous messageGo to next message
Siva Raj is currently offline Siva RajFriend
Messages: 7
Registered: January 2012
Junior Member
Hi Martin,

"Eclipse Clean" did not help. Please find the attached screenshot.
Re: DAWN and Synchronous Modeling [message #872438 is a reply to message #872256] Wed, 16 May 2012 05:54 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 15.05.2012 21:25, schrieb Siva Raj:
> Hi Martin,
>
> "Eclipse Clean" did not help. Please find the attached screenshot.

I can't see any exact problem marker descriptions. Why do you think this screenshot can help us to help you?

Cheers
/Eike


Re: DAWN and Synchronous Modeling [message #873921 is a reply to message #872438] Sat, 19 May 2012 13:32 Go to previous message
Siva Raj is currently offline Siva RajFriend
Messages: 7
Registered: January 2012
Junior Member
From this, you could see the projects which has problems. I thought, this might help you.
Previous Topic:CDO developer needed
Next Topic:[CDO] CDOQuery and local changes
Goto Forum:
  


Current Time: Thu Mar 28 14:38:56 GMT 2024

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

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

Back to the top