Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » CDO update logic
CDO update logic [message #127386] Wed, 23 July 2008 06:56 Go to next message
Saulius Tvarijonas is currently offline Saulius TvarijonasFriend
Messages: 34
Registered: July 2009
Member
Hi,

I am new to CDO and trying to understand updates logic. As I understand
changes are automatically propagated to other clients after commit. Is
it possible to control it? In case I do not want to get latest changes
automatically. I would like to know when something changes, but not
update automatically. Is it possible? From source code I see it is
invalidating objects automatically only.

Saulius
Re: CDO update logic [message #127389 is a reply to message #127386] Wed, 23 July 2008 09:08 Go to previous message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

This is a multi-part message in MIME format.
--------------040605060008050602060001
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Saulius,

I copied this thread to the EMF newsgroup where CDO is now supported.

When a CommitTransactionIndication arrives at a CDO server the server
persists all the modifications and then notifies all connected client
sessions via InvalidationNotifications. You're right that these messages
do *not* contain the complete changes, only the CDOID and version of the
changed objects. The client session then fires a CDOInvalidationEvent:

|*public interface *CDOSessionInvalidationEvent *extends *CDOSessionEvent
{
/**
* Returns the time stamp of the server transaction if this event was sent as a result of a successfully committed
* transaction or <code>LOCAL_ROLLBACK</code> if this event was sent due to a local rollback.
*/
*public **long *getTimeStamp();

*public *Set<CDOIDAndVersion> getDirtyOIDs();
}|


The shipped CDOEditor listens to these events and refreshes the dirty
objects.

Several Bugzillas relate to your question:

230832: Make remote invalidation configurable
https://bugs.eclipse.org/bugs/show_bug.cgi?id=230832

233490: Change Subscription
https://bugs.eclipse.org/bugs/show_bug.cgi?id=233490

201997: Support EMF notification for invalidation of objects
https://bugs.eclipse.org/bugs/show_bug.cgi?id=201997

Cheers
/Eike



Saulius Tvarijonas schrieb:
> Hi,
>
> I am new to CDO and trying to understand updates logic. As I
> understand changes are automatically propagated to other clients after
> commit. Is it possible to control it? In case I do not want to get
> latest changes automatically. I would like to know when something
> changes, but not update automatically. Is it possible? From source
> code I see it is invalidating objects automatically only.
>
> Saulius

--------------040605060008050602060001
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Saulius,<br>
<br>
I copied this thread to the EMF newsgroup where CDO is now supported.<br>
<br>
When a CommitTransactionIndication arrives at a CDO server the server
persists all the modifications and then notifies all connected client
sessions via InvalidationNotifications. You're right that these
messages do *not* contain the complete changes, only the CDOID and
version of the changed objects. The client session then fires a
CDOInvalidationEvent:<br>
<br>
<title></title>
<style type="text/css">
<!--code { font-family: Courier New, Courier; font-size: 10pt; margin: 0px; }-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- ======================================================== -->
<!-- = Java Sourcecode to HTML automatically converted code = --><!-- = Java2Html Converter 5.0 [2006-02-26] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<!-- start source code --> <td align="left" nowrap="nowrap"
valign="top"> <code><font color="#7f0055"><b>public&nbsp;interface&nbsp;</b ></font><font
color="#000000">CDOSessionInvalidationEvent&nbsp;</font ><font
color="#7f0055"><b>extends&nbsp;</b></font><font color="#000000">CDOSessionEvent</font><br>
<font color="#000000">{</font><br>
<font color="#ffffff"></font><font color="#ffffff">&nbsp; </font><font
color="#3f5fbf">/**</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf"> *&nbsp;Returns&nbsp;the&nbsp;time&nbsp;stamp &nbsp;of&nbsp;the&nbsp;server&nbsp;transacti on&nbsp;if&nbsp;this&nbsp;event&nbsp;was& ;nbsp;sent&nbsp;as&nbsp;a&nbsp;result&nbsp;o f&nbsp;a&nbsp;successfully&nbsp;committed </font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*&nbsp;transaction&nbsp;or&nbsp; </font><font
color="#7f7f9f">&lt;code&gt;</font><font color="#3f5fbf">LOCAL_ROLLBACK</font><font
color="#7f7f9f">&lt;/code&gt;&nbsp;</font><font color="#3f5fbf"> if&nbsp;this&nbsp;event&nbsp;was&nbsp;sent&a mp;nbsp;due&nbsp;to&nbsp;a&nbsp;local&nbsp;r ollback. </font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*/</font><br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#7f0055"><b>public&nbsp;</b></font><font
color="#7f0055"><b>long&nbsp;</b></font><font color="#000000">getTimeStamp</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#7f0055"><b>public&nbsp;</b></font><font
color="#000000">Set&lt;CDOIDAndVersion&gt;&nbsp;getDirtyOIDs </font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#000000">}</font></code> </td>
<!-- end source code --> </tr>
</tbody>
</table>
</div>
<!-- = END of automatically generated HTML code = -->
<!-- ======================================================== --><br>
The shipped CDOEditor listens to these events and refreshes the dirty
objects.<br>
<br>
Several Bugzillas relate to your question:<br>
<br>
230832: Make remote invalidation configurable<br>
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=230832">https://bugs.eclipse.org/bugs/show_bug.cgi?id=230832</a><br>
<br>
233490: Change Subscription<br>
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=233490">https://bugs.eclipse.org/bugs/show_bug.cgi?id=233490</a><br>
<br>
201997: Support EMF notification for invalidation of objects<br>
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=201997">https://bugs.eclipse.org/bugs/show_bug.cgi?id=201997</a><br>
<br>
Cheers<br>
/Eike<br>
<br>
<br>
<br>
Saulius Tvarijonas schrieb:
<blockquote cite="mid:g66kno$90o$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I am new to CDO and trying to understand updates logic. As I understand
changes are automatically propagated to other clients after commit. Is
it possible to control it? In case I do not want to get latest changes
automatically. I would like to know when something changes, but not
update automatically. Is it possible? From source code I see it is
invalidating objects automatically only.
<br>
<br>
Saulius
<br>
</blockquote>
</body>
</html>

--------------040605060008050602060001--
Re: CDO update logic [message #620138 is a reply to message #127386] Wed, 23 July 2008 09:08 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040605060008050602060001
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Saulius,

I copied this thread to the EMF newsgroup where CDO is now supported.

When a CommitTransactionIndication arrives at a CDO server the server
persists all the modifications and then notifies all connected client
sessions via InvalidationNotifications. You're right that these messages
do *not* contain the complete changes, only the CDOID and version of the
changed objects. The client session then fires a CDOInvalidationEvent:

|*public interface *CDOSessionInvalidationEvent *extends *CDOSessionEvent
{
/**
* Returns the time stamp of the server transaction if this event was sent as a result of a successfully committed
* transaction or <code>LOCAL_ROLLBACK</code> if this event was sent due to a local rollback.
*/
*public **long *getTimeStamp();

*public *Set<CDOIDAndVersion> getDirtyOIDs();
}|


The shipped CDOEditor listens to these events and refreshes the dirty
objects.

Several Bugzillas relate to your question:

230832: Make remote invalidation configurable
https://bugs.eclipse.org/bugs/show_bug.cgi?id=230832

233490: Change Subscription
https://bugs.eclipse.org/bugs/show_bug.cgi?id=233490

201997: Support EMF notification for invalidation of objects
https://bugs.eclipse.org/bugs/show_bug.cgi?id=201997

Cheers
/Eike



Saulius Tvarijonas schrieb:
> Hi,
>
> I am new to CDO and trying to understand updates logic. As I
> understand changes are automatically propagated to other clients after
> commit. Is it possible to control it? In case I do not want to get
> latest changes automatically. I would like to know when something
> changes, but not update automatically. Is it possible? From source
> code I see it is invalidating objects automatically only.
>
> Saulius

--------------040605060008050602060001
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Saulius,<br>
<br>
I copied this thread to the EMF newsgroup where CDO is now supported.<br>
<br>
When a CommitTransactionIndication arrives at a CDO server the server
persists all the modifications and then notifies all connected client
sessions via InvalidationNotifications. You're right that these
messages do *not* contain the complete changes, only the CDOID and
version of the changed objects. The client session then fires a
CDOInvalidationEvent:<br>
<br>
<title></title>
<style type="text/css">
<!--code { font-family: Courier New, Courier; font-size: 10pt; margin: 0px; }-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- ======================================================== -->
<!-- = Java Sourcecode to HTML automatically converted code = --><!-- = Java2Html Converter 5.0 [2006-02-26] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<!-- start source code --> <td align="left" nowrap="nowrap"
valign="top"> <code><font color="#7f0055"><b>public&nbsp;interface&nbsp;</b ></font><font
color="#000000">CDOSessionInvalidationEvent&nbsp;</font ><font
color="#7f0055"><b>extends&nbsp;</b></font><font color="#000000">CDOSessionEvent</font><br>
<font color="#000000">{</font><br>
<font color="#ffffff"></font><font color="#ffffff">&nbsp; </font><font
color="#3f5fbf">/**</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf"> *&nbsp;Returns&nbsp;the&nbsp;time&nbsp;stamp &nbsp;of&nbsp;the&nbsp;server&nbsp;transacti on&nbsp;if&nbsp;this&nbsp;event&nbsp;was& ;nbsp;sent&nbsp;as&nbsp;a&nbsp;result&nbsp;o f&nbsp;a&nbsp;successfully&nbsp;committed </font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*&nbsp;transaction&nbsp;or&nbsp; </font><font
color="#7f7f9f">&lt;code&gt;</font><font color="#3f5fbf">LOCAL_ROLLBACK</font><font
color="#7f7f9f">&lt;/code&gt;&nbsp;</font><font color="#3f5fbf"> if&nbsp;this&nbsp;event&nbsp;was&nbsp;sent&a mp;nbsp;due&nbsp;to&nbsp;a&nbsp;local&nbsp;r ollback. </font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*/</font><br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#7f0055"><b>public&nbsp;</b></font><font
color="#7f0055"><b>long&nbsp;</b></font><font color="#000000">getTimeStamp</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#7f0055"><b>public&nbsp;</b></font><font
color="#000000">Set&lt;CDOIDAndVersion&gt;&nbsp;getDirtyOIDs </font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#000000">}</font></code> </td>
<!-- end source code --> </tr>
</tbody>
</table>
</div>
<!-- = END of automatically generated HTML code = -->
<!-- ======================================================== --><br>
The shipped CDOEditor listens to these events and refreshes the dirty
objects.<br>
<br>
Several Bugzillas relate to your question:<br>
<br>
230832: Make remote invalidation configurable<br>
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=230832">https://bugs.eclipse.org/bugs/show_bug.cgi?id=230832</a><br>
<br>
233490: Change Subscription<br>
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=233490">https://bugs.eclipse.org/bugs/show_bug.cgi?id=233490</a><br>
<br>
201997: Support EMF notification for invalidation of objects<br>
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=201997">https://bugs.eclipse.org/bugs/show_bug.cgi?id=201997</a><br>
<br>
Cheers<br>
/Eike<br>
<br>
<br>
<br>
Saulius Tvarijonas schrieb:
<blockquote cite="mid:g66kno$90o$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I am new to CDO and trying to understand updates logic. As I understand
changes are automatically propagated to other clients after commit. Is
it possible to control it? In case I do not want to get latest changes
automatically. I would like to know when something changes, but not
update automatically. Is it possible? From source code I see it is
invalidating objects automatically only.
<br>
<br>
Saulius
<br>
</blockquote>
</body>
</html>

--------------040605060008050602060001--


Previous Topic:CDO update logic
Next Topic:[EMFCompare] diff:UpdateUniqueReferenceValue
Goto Forum:
  


Current Time: Fri Apr 19 09:22:54 GMT 2024

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

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

Back to the top