Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [CDO][0.8.0] Information about development
[CDO][0.8.0] Information about development [message #94050] Fri, 24 August 2007 11:03 Go to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
I was looking at the file that was modified on the project... and it seems
that your are building a generic framework to access relational database as
well as a mapping strategy. Hibernate is already doing that...
My question is the following.. What its the improvement you are doing that
Hibernate doesn't have ? You probably have a good answer for me!!!
Re: [CDO][0.8.0] Information about development [message #94080 is a reply to message #94050] Fri, 24 August 2007 14:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Simon,

Good question, if I remember correctly the Hibernate project was not
started when I published the first version of of CDO.
And even later Hibernate was not able to work with dynamic models (I'm
not a Hibernate expert, so please correct me if I'm wrong).
Today I'm curious whether it will be easily possible to implement all
the advanced features of CDO (for example transparent versioning,
branching in the future) with Hibernate.
I hope I will be able to learn from your Hibernate based IStore
implementation ;-)

Cheers
/Eike


Simon McDuff schrieb:
> I was looking at the file that was modified on the project... and it seems
> that your are building a generic framework to access relational database as
> well as a mapping strategy. Hibernate is already doing that...
> My question is the following.. What its the improvement you are doing that
> Hibernate doesn't have ? You probably have a good answer for me!!!
>
>
>
Re: [CDO][0.8.0] Information about development [message #95114 is a reply to message #94080] Fri, 31 August 2007 18:45 Go to previous messageGo to next message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Eike,

I would also like to add that the Hibernate solution does not provide
client change notifications, as CDO does.

Mark.
Re: [CDO][0.8.0] Information about development [message #95144 is a reply to message #95114] Fri, 31 August 2007 19:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Mark,

I suspect that Simon is aware of that.
The new CDO server has an extensible storage framework for which Simon
is currently about to develop a Hibernate implementation.
With that you'd have Hibernate at the CDO server and still have change
notifications at the CDO clients.
Simon, correct?

Cheers
/Eike


Mark schrieb:
> Eike,
>
> I would also like to add that the Hibernate solution does not provide
> client change notifications, as CDO does.
>
> Mark.
>
Re: [CDO][0.8.0] Information about development [message #95175 is a reply to message #95144] Sat, 01 September 2007 00:25 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Yes . This is correct Eike.

Mark,
don`t forget that you will need to modify objects through CDO to have the
modifications.

If you have
- client A and B that access you database through CDO
- client C and D that access your database through hibernate directly.

Changes made by A will only notify B
Changes made by B will only notify A
Changes made by C will not notify anybody.
Changes made by D will not notify anybody.

For the notification process, I have also added a feature to be able to be
notify through the EMF notifications.

EObject objectOfInterest = .....

objectOfInterest.eAdapter( eAdapter );

You will receive all events. If you receive [EInvalidationObject extends
Notification] it is because the objects have been invalidate. At this point
you can do whatever you would like.

This feature is in experimentation... but seem to work fine.

What do you think of that feature Eike ?

Have a nice day.


"Eike Stepper" <stepper@sympedia.de> a
Re: [CDO][0.8.0] Information about development [message #95190 is a reply to message #94080] Sat, 01 September 2007 00:46 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
I forgot to answer that thread.. sorry..

Here are some details about hibernate and dynamic. I didn`t test it.. but
I`m pretty sure it supports dynamic model.

http://www.elver.org/hibernate/dynamic.html

Hibernate does support many things. For versionning... I planned to add a
few attributes at the persistence layer. It will be configurable.

Generic O/R mapping it is something that could go very far (if we talk about
feature and optimization).
I would not like to do my own implementation... it will be too time
consuming!!!

You are courageous. Good luck!!

Simon



"Eike Stepper" <stepper@sympedia.de> a
Re: [CDO][0.8.0] Information about development [message #95218 is a reply to message #95175] Sat, 01 September 2007 05:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Simon McDuff schrieb:
> Yes . This is correct Eike.
>
> Mark,
> don`t forget that you will need to modify objects through CDO to have the
> modifications.
>
> If you have
> - client A and B that access you database through CDO
> - client C and D that access your database through hibernate directly.
>
> Changes made by A will only notify B
> Changes made by B will only notify A
> Changes made by C will not notify anybody.
> Changes made by D will not notify anybody.
>
> For the notification process, I have also added a feature to be able to be
> notify through the EMF notifications.
>
> EObject objectOfInterest = .....
>
> objectOfInterest.eAdapter( eAdapter );
>
Should that be objectOfInterest.eAdapters().add(eAdapter) ?

> You will receive all events. If you receive [EInvalidationObject extends
> Notification] it is because the objects have been invalidate. At this point
> you can do whatever you would like.
>
> This feature is in experimentation... but seem to work fine.
>
> What do you think of that feature Eike ?
>
I'm not sure if I understand this. Could you please explain it once more?
Currently the process of *invalidation* doesn't directly lead to EMF
*notification*, that's true.
And intended since it is not a modification of values at once.
But subsequent access to an invalidated object will lead to automatic
reload.

The CDOEditor can update invalidated objects at once (was and will be
optional) because it listens to the CDOInvalidatenEvents of the CDOSession.
It's not the default behaviour that invalidated objects are reloaded at
once. This is only a feature of the UI.

Ahh, I guess you want to use a similar mechanism (CDOEventHandler) to
fire notifications that are subclasses of
org.eclipse.emf.common.notify.Notification?
Just like the RESOLVED notifications...

Yes, that seems to be a nice feature. Please open a feature request so
that I can review yur patch.

Cheers
/Eike
Re: [CDO][0.8.0] Information about development [message #95232 is a reply to message #95190] Sat, 01 September 2007 05:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Simon McDuff schrieb:
> I forgot to answer that thread.. sorry..
>
> Here are some details about hibernate and dynamic. I didn`t test it.. but
> I`m pretty sure it supports dynamic model.
>
> http://www.elver.org/hibernate/dynamic.html
>
> Hibernate does support many things. For versionning... I planned to add a
> few attributes at the persistence layer. It will be configurable.
>
> Generic O/R mapping it is something that could go very far (if we talk about
> feature and optimization).
>
As I said, I'm really nervous to see your code ;-)
It will for sure be good to have different implementations/integrations
of the storage layer.
People will want to choose different ones depending on a variety of reasons.

> I would not like to do my own implementation... it will be too time
> consuming!!!
>
> You are courageous. Good luck!!
>
The mapping layer I'm developing has different requirements than
Hibernate which makes it much easier for me to implement it.
For example I don't want to support all possible mapping constructs or
existing DB layouts.
Nevertheless the new version is supporting more mappings and strategies
than the 0.7.0 version.

Classes:
- ONE_TABLE_PER_CLASS_IN_HIERARCHY (vertical mapping)
- ONE_TABLE_PER_CONCRETE_CLASS (horizontal mapping)
- ONE_TABLE_PER_DATA_TYPE (planned)

To-One-References:
- LIKE_ATTRIBUTES
- LIKE_TO_MANY_REFERENCES

To-Many-References:
- ONE_TABLE_PER_REFERENCE
- ONE_TABLE_PER_CLASS
- ONE_TABLE_PER_PACKAGE
- ONE_TABLE_PER_REPOSITORY
- LIKE_ATTRIBUTES (String based ID list)

All of them will optionally support transparent versioning and
historical auditing as well.

Cheers
/Eike
Re: [CDO][0.8.0] Information about development [message #95264 is a reply to message #95218] Sat, 01 September 2007 09:53 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
"Eike Stepper" <stepper@sympedia.de> a
Re: [CDO][0.8.0] Information about development [message #95279 is a reply to message #95232] Sat, 01 September 2007 09:57 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Also,
if you are using hibernate through JPA.. and would like to access CDO server
.... You should not change any of your code... or almost.... and your
application should still work.

Specific feature that hibernate uses without going through JPA interface ..
will not be supported..

This will be nice !!! (I hope)


"Eike Stepper" <stepper@sympedia.de> a
Re: [CDO][0.8.0] Information about development [message #95309 is a reply to message #95264] Sat, 01 September 2007 10:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Simon McDuff schrieb:
>>> You will receive all events. If you receive [EInvalidationObject extends
>>> Notification] it is because the objects have been invalidate. At this
>>> point you can do whatever you would like.
>>>
>>> This feature is in experimentation... but seem to work fine.
>>>
>>> What do you think of that feature Eike ?
>>>
>> I'm not sure if I understand this. Could you please explain it once more?
>> Currently the process of *invalidation* doesn't directly lead to EMF
>> *notification*, that's true.
>> And intended since it is not a modification of values at once.
>> But subsequent access to an invalidated object will lead to automatic
>> reload.
>>
> I have added one interface name InvalidateNotification (extends
> Notification) and InvalidationInvocationImpl (implements
> InvalidateNotifcation).
> The goal here is to simplify the user...CDO will notify with a
> CDOSessionInvalidationEvent.
> CDOSessionInvalidationEvent contains a list of CDOID. To simplify the user
> that are interested in a special object... they only ned to
>
> objectOfInterest.eAdapters().add(eAdapter)
>
> And they will be notify.
>
> CDOView has a feature called enableInvalidateNotifications to determine
> wether or not a specific view should notify invalidation.
>
> (Right now, I put it under CDOSessionExtended... and I take the CDOView in
> parameters... since I can only extend CDOTransaction... and not CDOViewImpl
> ... since I don`t want to subclass both of them... So I add my feature under
> CDOSEssionExtended.. and pass the CDOView in parameters)

The context/scope of invalidations is always the session.
When an InvalidationIndication arrives at the client session the following happens:

public void CDOSessionImpl.notifyInvalidation(long timeStamp, Set<CDOID> dirtyOIDs, CDOViewImpl excludedView)
{
dirtyOIDs = Collections.unmodifiableSet(dirtyOIDs);
for (CDOViewImpl view : getViews())
{
if (view != excludedView)
{
try
{
*view.notifyInvalidation(timeStamp, dirtyOIDs);*
}
catch (RuntimeException ex)
{
OM.LOG.error(ex);
}
}
}

*fireEvent(new InvalidationEvent(excludedView, timeStamp, dirtyOIDs));*
}

All views of the session are notified by direct calls.
If the transaction that caused the invalidation is part of the same session it is excluded from notification.
After that all higher level listeners are notified, for example CDOEditor.

Why do you want to use CDOView as the context?


>> The CDOEditor can update invalidated objects at once (was and will be
>> optional) because it listens to the CDOInvalidatenEvents of the
>> CDOSession.
>> It's not the default behaviour that invalidated objects are reloaded at
>> once. This is only a feature of the UI.
>>
>> Ahh, I guess you want to use a similar mechanism (CDOEventHandler) to fire
>> notifications that are subclasses of
>> org.eclipse.emf.common.notify.Notification?
>> Just like the RESOLVED notifications...
>>
>> Yes, that seems to be a nice feature. Please open a feature request so
>> that I can review yur patch.
>>
>
> Do you want me to redesign the code to show it how it should be ... or to
> have the code with my CDOSessionExtended ?

If it's not too much work for you it's more convenient for me if you attach a patch that shows how you would integrate it directly into the existing code.

Cheers
/Eike
Re: [CDO][0.8.0] Information about development [message #95324 is a reply to message #95309] Sat, 01 September 2007 12:27 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0374_01C7EC71.DF2C23E0
Content-Type: text/plain;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable


"Eike Stepper" <stepper@sympedia.de> a =E9crit dans le message de news: =
fbbeof$iun$1@build.eclipse.org...
> Simon McDuff schrieb:
>>>> You will receive all events. If you receive [EInvalidationObject =
extends=20
>>>> Notification] it is because the objects have been invalidate. At =
this=20
>>>> point you can do whatever you would like.
>>>>
>>>> This feature is in experimentation... but seem to work fine.
>>>>
>>>> What do you think of that feature Eike ?
>>>>
>>> I'm not sure if I understand this. Could you please explain it once =
more?
>>> Currently the process of *invalidation* doesn't directly lead to EMF =

>>> *notification*, that's true.
>>> And intended since it is not a modification of values at once.
>>> But subsequent access to an invalidated object will lead to =
automatic=20
>>> reload.
>>>
>> I have added one interface name InvalidateNotification (extends=20
>> Notification) and InvalidationInvocationImpl (implements=20
>> InvalidateNotifcation).
>> The goal here is to simplify the user...CDO will notify with a=20
>> CDOSessionInvalidationEvent.
>> CDOSessionInvalidationEvent contains a list of CDOID. To simplify =
the user=20
>> that are interested in a special object... they only ned to
>>=20
>> objectOfInterest.eAdapters().add(eAdapter)
>>=20
>> And they will be notify.
>>=20
>> CDOView has a feature called enableInvalidateNotifications to =
determine=20
>> wether or not a specific view should notify invalidation.
>>=20
>> (Right now, I put it under CDOSessionExtended... and I take the =
CDOView in=20
>> parameters... since I can only extend CDOTransaction... and not =
CDOViewImpl=20
>> ... since I don`t want to subclass both of them... So I add my =
feature under=20
>> CDOSEssionExtended.. and pass the CDOView in parameters)
>=20
> The context/scope of invalidations is always the session.
> When an InvalidationIndication arrives at the client session the =
following happens:
>=20
> public void CDOSessionImpl.notifyInvalidation(long timeStamp, =
Set<CDOID> dirtyOIDs, CDOViewImpl excludedView)
> {
> dirtyOIDs =3D Collections.unmodifiableSet(dirtyOIDs);
> for (CDOViewImpl view : getViews())
> {
> if (view !=3D excludedView)
> {
> try
> {
> *view.notifyInvalidation(timeStamp, dirtyOIDs);*
> }
> catch (RuntimeException ex)
> {
> OM.LOG.error(ex);
> }
> }
> }
>=20
> *fireEvent(new InvalidationEvent(excludedView, timeStamp, =
dirtyOIDs));*
> }
>=20
> All views of the session are notified by direct calls.

> If the transaction that caused the invalidation is part of the same =
session it is excluded from notification.
> After that all higher level listeners are notified, for example =
CDOEditor.
>=20
> Why do you want to use CDOView as the context?
>=20

Consumer always work with views.. right ? EObject are attached to =
CDOView...=20

When the user activate this feature... The CDOView listen to CDOevent

When I received event I do the following

public void notifyEvent(IEvent event)=20
{
if (event instanceof CDOSessionInvalidationEvent)
{
CDOSessionInvalidationEvent invalidateEvent =3D =
(CDOSessionInvalidationEvent)event;
for (CDOID id : invalidateEvent.getDirtyOIDs())
{
if (cdoView.isObjectRegistered(id))
{
EObject object =3D cdoView.getObject(id);
InvalidateNotification invalidateObject =3D new =
InvalidateNotification(object);=20
object.eNotify( invalidateObject );
}
}
}
}

Make sense ?

>=20
>>> The CDOEditor can update invalidated objects at once (was and will =
be=20
>>> optional) because it listens to the CDOInvalidatenEvents of the=20
>>> CDOSession.
>>> It's not the default behaviour that invalidated objects are reloaded =
at=20
>>> once. This is only a feature of the UI.
>>>
>>> Ahh, I guess you want to use a similar mechanism (CDOEventHandler) =
to fire=20
>>> notifications that are subclasses of=20
>>> org.eclipse.emf.common.notify.Notification?
>>> Just like the RESOLVED notifications...
>>>
>>> Yes, that seems to be a nice feature. Please open a feature request =
so=20
>>> that I can review yur patch.
>>>
>>=20
>> Do you want me to redesign the code to show it how it should be ... =
or to=20
>> have the code with my CDOSessionExtended ?
>=20
> If it's not too much work for you it's more convenient for me if you =
attach a patch that shows how you would integrate it directly into the =
existing code.
>=20
> Cheers
> /Eike
>=20
>
------=_NextPart_000_0374_01C7EC71.DF2C23E0
Content-Type: text/html;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-15">
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Eike Stepper" &lt;</FONT><A=20
href=3D"mailto:stepper@sympedia.de"><FONT face=3DArial=20
size=3D2>stepper@sympedia.de</FONT></A><FONT face=3DArial size=3D2>&gt; =
a =E9crit dans=20
le message de news: </FONT><A =
href=3D"mailto:fbbeof$iun$1@build.eclipse.org"><FONT=20
face=3DArial size=3D2>fbbeof$iun$1@build.eclipse.org</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; Simon McDuff =
schrieb:<BR>&gt;&gt;&gt;&gt; You=20
will receive all events. If you receive [EInvalidationObject extends=20
<BR>&gt;&gt;&gt;&gt; Notification]&nbsp; it is because the objects have =
been=20
invalidate. At this <BR>&gt;&gt;&gt;&gt; point you can do whatever you =
would=20
like.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; This feature is in=20
experimentation... but seem to work=20
fine.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; What do you think of that =
feature=20
Eike ?<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt; I'm not sure if I understand =
this.=20
Could you please explain it once more?<BR>&gt;&gt;&gt; Currently the =
process of=20
*invalidation* doesn't directly lead to EMF <BR>&gt;&gt;&gt; =
*notification*,=20
that's true.<BR>&gt;&gt;&gt; And intended since it is not a modification =
of=20
values at once.<BR>&gt;&gt;&gt; But subsequent access to an invalidated =
object=20
will lead to automatic <BR>&gt;&gt;&gt; =
reload.<BR>&gt;&gt;&gt;<BR>&gt;&gt; I=20
have added one interface name InvalidateNotification (extends =
<BR>&gt;&gt;=20
Notification) and InvalidationInvocationImpl (implements <BR>&gt;&gt;=20
InvalidateNotifcation).<BR>&gt;&gt; The goal here is to simplify the =
user...CDO=20
will notify with a <BR>&gt;&gt; CDOSessionInvalidationEvent.<BR>&gt;&gt; =

CDOSessionInvalidationEvent contains a list of CDOID.&nbsp; To simplify =
the user=20
<BR>&gt;&gt; that are interested in a special object... they only ned=20
to<BR>&gt;&gt; <BR>&gt;&gt;=20
objectOfInterest.eAdapters().add(eAdapter)<BR>&gt;&gt; <BR>&gt;&gt; And =
they=20
will be notify.<BR>&gt;&gt; <BR>&gt;&gt; CDOView has a feature called=20
enableInvalidateNotifications to determine <BR>&gt;&gt; wether or not a =
specific=20
view should notify invalidation.<BR>&gt;&gt; <BR>&gt;&gt; (Right now, I =
put it=20
under CDOSessionExtended... and I take the CDOView in <BR>&gt;&gt; =
parameters...=20
since I can only extend CDOTransaction... and not CDOViewImpl =
<BR>&gt;&gt; ...=20
since I don`t want to subclass both of them... So I add my feature under =

<BR>&gt;&gt; CDOSEssionExtended.. and pass the CDOView in =
parameters)<BR>&gt;=20
<BR>&gt; The context/scope of invalidations is always the =
session.<BR>&gt; When=20
an InvalidationIndication arrives at the client session the following=20
happens:<BR>&gt; <BR>&gt;&nbsp;&nbsp; public void=20
CDOSessionImpl.notifyInvalidation(long timeStamp, Set&lt;CDOID&gt; =
dirtyOIDs,=20
CDOViewImpl excludedView)<BR>&gt;&nbsp;&nbsp; =
{<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
dirtyOIDs =3D=20
Collections.unmodifiableSet(dirtyOIDs);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
for=20
(CDOViewImpl view : getViews())<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp; if (view !=3D=20
excludedView)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
try<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
*view.notifyInvalidation(timeStamp,=20
dirtyOIDs);*<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp; catch=20
(RuntimeException =
ex)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
OM.LOG.error(ex);<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=
=20
}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp; =
}<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
}<BR>&gt; <BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; *fireEvent(new=20
InvalidationEvent(excludedView, timeStamp, =
dirtyOIDs));*<BR>&gt;&nbsp;&nbsp;=20
}<BR>&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; All views of the session are =
notified by=20
direct calls.</FONT></DIV><FONT face=3DArial size=3D2>
<DIV><BR>&gt; If the transaction that caused the invalidation is part of =
the=20
same session it is excluded from notification.<BR>&gt; After that all =
higher=20
level listeners are notified, for example CDOEditor.<BR>&gt; <BR>&gt; =
Why do you=20
want to use CDOView as the context?<BR>&gt; </DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2>Consumer always work with views.. right =

?&nbsp;EObject are attached to CDOView... </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>When the user activate this feature... =
The CDOView=20
listen to&nbsp;CDOevent</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>When I received event I do the=20
following</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>public void =
notifyEvent(IEvent event)=20
</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>{</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>if (event instanceof=20
CDOSessionInvalidationEvent)</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>{</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;=20
CDOSessionInvalidationEvent invalidateEvent =3D=20
(CDOSessionInvalidationEvent)event;</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; for =
(CDOID id :=20
invalidateEvent.getDirtyOIDs())</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
{</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; if=20
(cdoView.isObjectRegistered(id))</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
{</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; EObject object =3D =
cdoView.getObject(id);</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial=20
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
InvalidateNotification invalidateObject =3D new =
InvalidateNotification(object);=20
</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; object.eNotify( invalidateObject );</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial=20
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;}</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
}</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
}</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></DIV>
<DIV>Make sense ?</DIV>
<DIV><BR>&gt; <BR>&gt;&gt;&gt; The CDOEditor can update invalidated =
objects at=20
once (was and will be <BR>&gt;&gt;&gt; optional) because it listens to =
the=20
CDOInvalidatenEvents of the <BR>&gt;&gt;&gt; CDOSession.<BR>&gt;&gt;&gt; =
It's=20
not the default behaviour that invalidated objects are reloaded at=20
<BR>&gt;&gt;&gt; once. This is only a feature of the=20
UI.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Ahh, I guess you want to use a =
similar=20
mechanism (CDOEventHandler) to fire <BR>&gt;&gt;&gt; notifications that =
are=20
subclasses of <BR>&gt;&gt;&gt;=20
org.eclipse.emf.common.notify.Notification?<BR>&gt;&gt;&gt; Just like =
the=20
RESOLVED notifications...<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Yes, that =
seems to be=20
a nice feature. Please open a feature request so <BR>&gt;&gt;&gt; that I =
can=20
review yur patch.<BR>&gt;&gt;&gt;<BR>&gt;&gt; <BR>&gt;&gt; Do you want =
me to=20
redesign the code to show it how it should be ... or to <BR>&gt;&gt; =
have the=20
code with my CDOSessionExtended ?<BR>&gt; <BR>&gt; If it's not too much =
work for=20
you it's more convenient for me if you attach a patch that shows how you =
would=20
integrate it directly into the existing code.</DIV>
<DIV>&gt; <BR>&gt; Cheers<BR>&gt; /Eike<BR>&gt;=20
<BR>&gt;</FONT></DIV></BODY></HTML>

------=_NextPart_000_0374_01C7EC71.DF2C23E0--
Re: [CDO][0.8.0] Information about development [message #95345 is a reply to message #95324] Sat, 01 September 2007 14:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

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

Simon,

What you say makes sense.
Please attach the complete patch to a feature request so that I can see
how the parts work together.
If everything is ok I can merge your changes into the code base.

Cheers
/Eike


Simon McDuff schrieb:
>
> "Eike Stepper" <stepper@sympedia.de <mailto:stepper@sympedia.de>> a
>
Re: [CDO][0.8.0] Information about development [message #95360 is a reply to message #95345] Sat, 01 September 2007 14:22 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_03B3_01C7EC81.FB595320
Content-Type: text/plain;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

OK I will merge it with CDOViewIMpl (instead of my CDOSession) and =
create the patch.


"Eike Stepper" <stepper@sympedia.de> a =E9crit dans le message de =
news: fbbsh0$f41$1@build.eclipse.org...
Simon,

What you say makes sense.
Please attach the complete patch to a feature request so that I can =
see how the parts work together.
If everything is ok I can merge your changes into the code base.

Cheers
/Eike


Simon McDuff schrieb:=20

"Eike Stepper" <stepper@sympedia.de> a =E9crit dans le message de =
news: fbbeof$iun$1@build.eclipse.org...
> Simon McDuff schrieb:
>>>> You will receive all events. If you receive =
[EInvalidationObject extends=20
>>>> Notification] it is because the objects have been invalidate. =
At this=20
>>>> point you can do whatever you would like.
>>>>
>>>> This feature is in experimentation... but seem to work fine.
>>>>
>>>> What do you think of that feature Eike ?
>>>>
>>> I'm not sure if I understand this. Could you please explain it =
once more?
>>> Currently the process of *invalidation* doesn't directly lead to =
EMF=20
>>> *notification*, that's true.
>>> And intended since it is not a modification of values at once.
>>> But subsequent access to an invalidated object will lead to =
automatic=20
>>> reload.
>>>
>> I have added one interface name InvalidateNotification (extends=20
>> Notification) and InvalidationInvocationImpl (implements=20
>> InvalidateNotifcation).
>> The goal here is to simplify the user...CDO will notify with a=20
>> CDOSessionInvalidationEvent.
>> CDOSessionInvalidationEvent contains a list of CDOID. To =
simplify the user=20
>> that are interested in a special object... they only ned to
>>=20
>> objectOfInterest.eAdapters().add(eAdapter)
>>=20
>> And they will be notify.
>>=20
>> CDOView has a feature called enableInvalidateNotifications to =
determine=20
>> wether or not a specific view should notify invalidation.
>>=20
>> (Right now, I put it under CDOSessionExtended... and I take the =
CDOView in=20
>> parameters... since I can only extend CDOTransaction... and not =
CDOViewImpl=20
>> ... since I don`t want to subclass both of them... So I add my =
feature under=20
>> CDOSEssionExtended.. and pass the CDOView in parameters)
>=20
> The context/scope of invalidations is always the session.
> When an InvalidationIndication arrives at the client session the =
following happens:
>=20
> public void CDOSessionImpl.notifyInvalidation(long timeStamp, =
Set<CDOID> dirtyOIDs, CDOViewImpl excludedView)
> {
> dirtyOIDs =3D Collections.unmodifiableSet(dirtyOIDs);
> for (CDOViewImpl view : getViews())
> {
> if (view !=3D excludedView)
> {
> try
> {
> *view.notifyInvalidation(timeStamp, dirtyOIDs);*
> }
> catch (RuntimeException ex)
> {
> OM.LOG.error(ex);
> }
> }
> }
>=20
> *fireEvent(new InvalidationEvent(excludedView, timeStamp, =
dirtyOIDs));*
> }
>=20
> All views of the session are notified by direct calls.

> If the transaction that caused the invalidation is part of the =
same session it is excluded from notification.
> After that all higher level listeners are notified, for example =
CDOEditor.
>=20
> Why do you want to use CDOView as the context?
>=20

Consumer always work with views.. right ? EObject are attached to =
CDOView...=20

When the user activate this feature... The CDOView listen to =
CDOevent

When I received event I do the following

public void notifyEvent(IEvent event)=20
{
if (event instanceof CDOSessionInvalidationEvent)
{
CDOSessionInvalidationEvent invalidateEvent =3D =
(CDOSessionInvalidationEvent)event;
for (CDOID id : invalidateEvent.getDirtyOIDs())
{
if (cdoView.isObjectRegistered(id))
{
EObject object =3D cdoView.getObject(id);
InvalidateNotification invalidateObject =3D new =
InvalidateNotification(object);=20
object.eNotify( invalidateObject );
}
}
}
}

Make sense ?

>=20
>>> The CDOEditor can update invalidated objects at once (was and =
will be=20
>>> optional) because it listens to the CDOInvalidatenEvents of the=20
>>> CDOSession.
>>> It's not the default behaviour that invalidated objects are =
reloaded at=20
>>> once. This is only a feature of the UI.
>>>
>>> Ahh, I guess you want to use a similar mechanism =
(CDOEventHandler) to fire=20
>>> notifications that are subclasses of=20
>>> org.eclipse.emf.common.notify.Notification?
>>> Just like the RESOLVED notifications...
>>>
>>> Yes, that seems to be a nice feature. Please open a feature =
request so=20
>>> that I can review yur patch.
>>>
>>=20
>> Do you want me to redesign the code to show it how it should be =
.... or to=20
>> have the code with my CDOSessionExtended ?
>=20
> If it's not too much work for you it's more convenient for me if =
you attach a patch that shows how you would integrate it directly into =
the existing code.
>=20
> Cheers
> /Eike
>=20
>
------=_NextPart_000_03B3_01C7EC81.FB595320
Content-Type: text/html;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-15>
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR></HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>OK I will merge it with CDOViewIMpl =
(instead of my=20
CDOSession) and create the patch.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Eike Stepper" &lt;<A=20
href=3D"mailto:stepper@sympedia.de">stepper@sympedia.de</A>&gt; a =
=E9crit dans le=20
message de news: <A=20
=
href=3D"mailto:fbbsh0$f41$1@build.eclipse.org">fbbsh0$f41$1@build.eclipse=
..org</A>...</DIV>Simon,<BR><BR>What=20
you say makes sense.<BR>Please attach the complete patch to a feature =
request=20
so that I can see how the parts work together.<BR>If everything is ok =
I can=20
merge your changes into the code =
base.<BR><BR>Cheers<BR>/Eike<BR><BR><BR>Simon=20
McDuff schrieb:=20
<BLOCKQUOTE cite=3Dmid:fbblqo$46j$1@build.eclipse.org type=3D"cite">
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
<STYLE></STYLE>

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Eike Stepper" &lt;</FONT><A=20
href=3D"mailto:stepper@sympedia.de" moz-do-not-send=3D"true"><FONT =
face=3DArial=20
size=3D2>stepper@sympedia.de</FONT></A><FONT face=3DArial =
size=3D2>&gt; a =E9crit=20
dans le message de news: </FONT><A=20
href=3D"mailto:fbbeof$iun$1@build.eclipse.org" =
moz-do-not-send=3D"true"><FONT=20
face=3DArial size=3D2>fbbeof$iun$1@build.eclipse.org</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; Simon McDuff =
schrieb:<BR>&gt;&gt;&gt;&gt;=20
You will receive all events. If you receive [EInvalidationObject =
extends=20
<BR>&gt;&gt;&gt;&gt; Notification]&nbsp; it is because the objects =
have been=20
invalidate. At this <BR>&gt;&gt;&gt;&gt; point you can do whatever =
you would=20
like.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; This feature is in=20
experimentation... but seem to work=20
fine.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; What do you think of =
that=20
feature Eike ?<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt; I'm not sure if I =

understand this. Could you please explain it once =
more?<BR>&gt;&gt;&gt;=20
Currently the process of *invalidation* doesn't directly lead to EMF =

<BR>&gt;&gt;&gt; *notification*, that's true.<BR>&gt;&gt;&gt; And =
intended=20
since it is not a modification of values at once.<BR>&gt;&gt;&gt; =
But=20
subsequent access to an invalidated object will lead to automatic=20
<BR>&gt;&gt;&gt; reload.<BR>&gt;&gt;&gt;<BR>&gt;&gt; I have added =
one=20
interface name InvalidateNotification (extends <BR>&gt;&gt; =
Notification)=20
and InvalidationInvocationImpl (implements <BR>&gt;&gt;=20
InvalidateNotifcation).<BR>&gt;&gt; The goal here is to simplify the =

user...CDO will notify with a <BR>&gt;&gt;=20
CDOSessionInvalidationEvent.<BR>&gt;&gt; CDOSessionInvalidationEvent =

contains a list of CDOID.&nbsp; To simplify the user <BR>&gt;&gt; =
that are=20
interested in a special object... they only ned to<BR>&gt;&gt; =
<BR>&gt;&gt;=20
objectOfInterest.eAdapters().add(eAdapter)<BR>&gt;&gt; <BR>&gt;&gt; =
And they=20
will be notify.<BR>&gt;&gt; <BR>&gt;&gt; CDOView has a feature =
called=20
enableInvalidateNotifications to determine <BR>&gt;&gt; wether or =
not a=20
specific view should notify invalidation.<BR>&gt;&gt; <BR>&gt;&gt; =
(Right=20
now, I put it under CDOSessionExtended... and I take the CDOView in=20
<BR>&gt;&gt; parameters... since I can only extend CDOTransaction... =
and not=20
CDOViewImpl <BR>&gt;&gt; ... since I don`t want to subclass both of =
them...=20
So I add my feature under <BR>&gt;&gt; CDOSEssionExtended.. and pass =
the=20
CDOView in parameters)<BR>&gt; <BR>&gt; The context/scope of =
invalidations=20
is always the session.<BR>&gt; When an InvalidationIndication =
arrives at the=20
client session the following happens:<BR>&gt; <BR>&gt;&nbsp;&nbsp; =
public=20
void CDOSessionImpl.notifyInvalidation(long timeStamp, =
Set&lt;CDOID&gt;=20
dirtyOIDs, CDOViewImpl excludedView)<BR>&gt;&nbsp;&nbsp;=20
{<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; dirtyOIDs =3D=20
=
Collections.unmodifiableSet(dirtyOIDs);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
for=20
(CDOViewImpl view : getViews())<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp; if (view !=3D=20
excludedView)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
try<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
=
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
*view.notifyInvalidation(timeStamp,=20
dirtyOIDs);*<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp; =

}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp; catch=20
(RuntimeException=20
ex)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
=
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
=
OM.LOG.error(ex);<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=
=20
}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;=20
}<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&gt; =
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
*fireEvent(new InvalidationEvent(excludedView, timeStamp,=20
dirtyOIDs));*<BR>&gt;&nbsp;&nbsp; }<BR>&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; All views of the session are =
notified by=20
direct calls.</FONT></DIV><FONT face=3DArial size=3D2></FONT>
<DIV><FONT face=3DArial size=3D2><BR>&gt; If the transaction that =
caused the=20
invalidation is part of the same session it is excluded from=20
notification.<BR>&gt; After that all higher level listeners are =
notified,=20
for example CDOEditor.<BR>&gt; <BR>&gt; Why do you want to use =
CDOView as=20
the context?<BR>&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>Consumer always work=20
with views.. right ?&nbsp;EObject are attached to CDOView...=20
</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>When =
the user activate=20
this feature... The CDOView listen =
to&nbsp;CDOevent</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>When I =
received event I=20
do the following</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>public void=20
notifyEvent(IEvent event) </FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>{</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>if (event=20
instanceof CDOSessionInvalidationEvent)</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>{</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; CDOSessionInvalidationEvent =
invalidateEvent =3D=20
(CDOSessionInvalidationEvent)event;</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; for (CDOID id :=20
invalidateEvent.getDirtyOIDs())</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; {</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if=20
(cdoView.isObjectRegistered(id))</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
EObject=20
object =3D cdoView.getObject(id);</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
=
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
InvalidateNotification invalidateObject =3D new=20
InvalidateNotification(object); </FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
object.eNotify( invalidateObject );</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
=
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;}</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; }</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>}</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></DIV>
<DIV><FONT face=3DArial size=3D2>Make sense ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>&gt; <BR>&gt;&gt;&gt; The =
CDOEditor can=20
update invalidated objects at once (was and will be <BR>&gt;&gt;&gt; =

optional) because it listens to the CDOInvalidatenEvents of the=20
<BR>&gt;&gt;&gt; CDOSession.<BR>&gt;&gt;&gt; It's not the default =
behaviour=20
that invalidated objects are reloaded at <BR>&gt;&gt;&gt; once. This =
is only=20
a feature of the UI.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Ahh, I guess =
you want=20
to use a similar mechanism (CDOEventHandler) to fire =
<BR>&gt;&gt;&gt;=20
notifications that are subclasses of <BR>&gt;&gt;&gt;=20
org.eclipse.emf.common.notify.Notification?<BR>&gt;&gt;&gt; Just =
like the=20
RESOLVED notifications...<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Yes, that =
seems to=20
be a nice feature. Please open a feature request so <BR>&gt;&gt;&gt; =
that I=20
can review yur patch.<BR>&gt;&gt;&gt;<BR>&gt;&gt; <BR>&gt;&gt; Do =
you want=20
me to redesign the code to show it how it should be ... or to =
<BR>&gt;&gt;=20
have the code with my CDOSessionExtended ?<BR>&gt; <BR>&gt; If it's =
not too=20
much work for you it's more convenient for me if you attach a patch =
that=20
shows how you would integrate it directly into the existing=20
code.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; <BR>&gt; Cheers<BR>&gt; =
/Eike<BR>&gt;=20
<BR>&gt;</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY ></HTML>

------=_NextPart_000_03B3_01C7EC81.FB595320--
Re: [CDO][0.8.0] Information about development [message #95392 is a reply to message #95360] Sun, 02 September 2007 04:23 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_03DF_01C7ECF7.7ABE0820
Content-Type: text/plain;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D201997
"Simon McDuff" <smcduff@hotmail.com> a =E9crit dans le message de =
news: fbbsiv$gmp$1@build.eclipse.org...
OK I will merge it with CDOViewIMpl (instead of my CDOSession) and =
create the patch.


"Eike Stepper" <stepper@sympedia.de> a =E9crit dans le message de =
news: fbbsh0$f41$1@build.eclipse.org...
Simon,

What you say makes sense.
Please attach the complete patch to a feature request so that I can =
see how the parts work together.
If everything is ok I can merge your changes into the code base.

Cheers
/Eike


Simon McDuff schrieb:=20

"Eike Stepper" <stepper@sympedia.de> a =E9crit dans le message de =
news: fbbeof$iun$1@build.eclipse.org...
> Simon McDuff schrieb:
>>>> You will receive all events. If you receive =
[EInvalidationObject extends=20
>>>> Notification] it is because the objects have been =
invalidate. At this=20
>>>> point you can do whatever you would like.
>>>>
>>>> This feature is in experimentation... but seem to work fine.
>>>>
>>>> What do you think of that feature Eike ?
>>>>
>>> I'm not sure if I understand this. Could you please explain it =
once more?
>>> Currently the process of *invalidation* doesn't directly lead =
to EMF=20
>>> *notification*, that's true.
>>> And intended since it is not a modification of values at once.
>>> But subsequent access to an invalidated object will lead to =
automatic=20
>>> reload.
>>>
>> I have added one interface name InvalidateNotification (extends =

>> Notification) and InvalidationInvocationImpl (implements=20
>> InvalidateNotifcation).
>> The goal here is to simplify the user...CDO will notify with a=20
>> CDOSessionInvalidationEvent.
>> CDOSessionInvalidationEvent contains a list of CDOID. To =
simplify the user=20
>> that are interested in a special object... they only ned to
>>=20
>> objectOfInterest.eAdapters().add(eAdapter)
>>=20
>> And they will be notify.
>>=20
>> CDOView has a feature called enableInvalidateNotifications to =
determine=20
>> wether or not a specific view should notify invalidation.
>>=20
>> (Right now, I put it under CDOSessionExtended... and I take the =
CDOView in=20
>> parameters... since I can only extend CDOTransaction... and not =
CDOViewImpl=20
>> ... since I don`t want to subclass both of them... So I add my =
feature under=20
>> CDOSEssionExtended.. and pass the CDOView in parameters)
>=20
> The context/scope of invalidations is always the session.
> When an InvalidationIndication arrives at the client session the =
following happens:
>=20
> public void CDOSessionImpl.notifyInvalidation(long timeStamp, =
Set<CDOID> dirtyOIDs, CDOViewImpl excludedView)
> {
> dirtyOIDs =3D Collections.unmodifiableSet(dirtyOIDs);
> for (CDOViewImpl view : getViews())
> {
> if (view !=3D excludedView)
> {
> try
> {
> *view.notifyInvalidation(timeStamp, dirtyOIDs);*
> }
> catch (RuntimeException ex)
> {
> OM.LOG.error(ex);
> }
> }
> }
>=20
> *fireEvent(new InvalidationEvent(excludedView, timeStamp, =
dirtyOIDs));*
> }
>=20
> All views of the session are notified by direct calls.

> If the transaction that caused the invalidation is part of the =
same session it is excluded from notification.
> After that all higher level listeners are notified, for example =
CDOEditor.
>=20
> Why do you want to use CDOView as the context?
>=20

Consumer always work with views.. right ? EObject are attached to =
CDOView...=20

When the user activate this feature... The CDOView listen to =
CDOevent

When I received event I do the following

public void notifyEvent(IEvent event)=20
{
if (event instanceof CDOSessionInvalidationEvent)
{
CDOSessionInvalidationEvent invalidateEvent =3D =
(CDOSessionInvalidationEvent)event;
for (CDOID id : invalidateEvent.getDirtyOIDs())
{
if (cdoView.isObjectRegistered(id))
{
EObject object =3D cdoView.getObject(id);
InvalidateNotification invalidateObject =3D new =
InvalidateNotification(object);=20
object.eNotify( invalidateObject );
}
}
}
}

Make sense ?

>=20
>>> The CDOEditor can update invalidated objects at once (was and =
will be=20
>>> optional) because it listens to the CDOInvalidatenEvents of =
the=20
>>> CDOSession.
>>> It's not the default behaviour that invalidated objects are =
reloaded at=20
>>> once. This is only a feature of the UI.
>>>
>>> Ahh, I guess you want to use a similar mechanism =
(CDOEventHandler) to fire=20
>>> notifications that are subclasses of=20
>>> org.eclipse.emf.common.notify.Notification?
>>> Just like the RESOLVED notifications...
>>>
>>> Yes, that seems to be a nice feature. Please open a feature =
request so=20
>>> that I can review yur patch.
>>>
>>=20
>> Do you want me to redesign the code to show it how it should be =
.... or to=20
>> have the code with my CDOSessionExtended ?
>=20
> If it's not too much work for you it's more convenient for me if =
you attach a patch that shows how you would integrate it directly into =
the existing code.
>=20
> Cheers
> /Eike
>=20
>
------=_NextPart_000_03DF_01C7ECF7.7ABE0820
Content-Type: text/html;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-15>
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR></HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D201997">https://b=
ugs.eclipse.org/bugs/show_bug.cgi?id=3D201997</A></FONT></DIV >
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Simon McDuff" &lt;<A=20
href=3D"mailto:smcduff@hotmail.com">smcduff@hotmail.com</A>&gt; a =
=E9crit dans le=20
message de news: <A=20
=
href=3D"mailto:fbbsiv$gmp$1@build.eclipse.org">fbbsiv$gmp$1@build.eclipse=
..org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>OK I will merge it with CDOViewIMpl =
(instead of=20
my CDOSession) and create the patch.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Eike Stepper" &lt;<A=20
href=3D"mailto:stepper@sympedia.de">stepper@sympedia.de</A>&gt; a =
=E9crit dans=20
le message de news: <A=20
=
href=3D"mailto:fbbsh0$f41$1@build.eclipse.org">fbbsh0$f41$1@build.eclipse=
..org</A>...</DIV>Simon,<BR><BR>What=20
you say makes sense.<BR>Please attach the complete patch to a =
feature=20
request so that I can see how the parts work together.<BR>If =
everything is=20
ok I can merge your changes into the code=20
base.<BR><BR>Cheers<BR>/Eike<BR><BR><BR>Simon McDuff schrieb:=20
<BLOCKQUOTE cite=3Dmid:fbblqo$46j$1@build.eclipse.org type=3D"cite">
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
<STYLE></STYLE>

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Eike Stepper" &lt;</FONT><A=20
href=3D"mailto:stepper@sympedia.de" moz-do-not-send=3D"true"><FONT =
face=3DArial=20
size=3D2>stepper@sympedia.de</FONT></A><FONT face=3DArial =
size=3D2>&gt; a =E9crit=20
dans le message de news: </FONT><A=20
href=3D"mailto:fbbeof$iun$1@build.eclipse.org" =
moz-do-not-send=3D"true"><FONT=20
face=3DArial =
size=3D2>fbbeof$iun$1@build.eclipse.org</FONT></A><FONT=20
face=3DArial size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; Simon McDuff=20
schrieb:<BR>&gt;&gt;&gt;&gt; You will receive all events. If you =
receive=20
[EInvalidationObject extends <BR>&gt;&gt;&gt;&gt; =
Notification]&nbsp; it=20
is because the objects have been invalidate. At this =
<BR>&gt;&gt;&gt;&gt;=20
point you can do whatever you would=20
like.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; This feature is in=20
experimentation... but seem to work=20
fine.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; What do you think of =
that=20
feature Eike ?<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt; I'm not sure if =
I=20
understand this. Could you please explain it once =
more?<BR>&gt;&gt;&gt;=20
Currently the process of *invalidation* doesn't directly lead to =
EMF=20
<BR>&gt;&gt;&gt; *notification*, that's true.<BR>&gt;&gt;&gt; And =
intended=20
since it is not a modification of values at once.<BR>&gt;&gt;&gt; =
But=20
subsequent access to an invalidated object will lead to automatic=20
<BR>&gt;&gt;&gt; reload.<BR>&gt;&gt;&gt;<BR>&gt;&gt; I have added =
one=20
interface name InvalidateNotification (extends <BR>&gt;&gt; =
Notification)=20
and InvalidationInvocationImpl (implements <BR>&gt;&gt;=20
InvalidateNotifcation).<BR>&gt;&gt; The goal here is to simplify =
the=20
user...CDO will notify with a <BR>&gt;&gt;=20
CDOSessionInvalidationEvent.<BR>&gt;&gt; =
CDOSessionInvalidationEvent=20
contains a list of CDOID.&nbsp; To simplify the user <BR>&gt;&gt; =
that are=20
interested in a special object... they only ned to<BR>&gt;&gt;=20
<BR>&gt;&gt; =
objectOfInterest.eAdapters().add(eAdapter)<BR>&gt;&gt;=20
<BR>&gt;&gt; And they will be notify.<BR>&gt;&gt; <BR>&gt;&gt; =
CDOView has=20
a feature called enableInvalidateNotifications to determine =
<BR>&gt;&gt;=20
wether or not a specific view should notify =
invalidation.<BR>&gt;&gt;=20
<BR>&gt;&gt; (Right now, I put it under CDOSessionExtended... and =
I take=20
the CDOView in <BR>&gt;&gt; parameters... since I can only extend=20
CDOTransaction... and not CDOViewImpl <BR>&gt;&gt; ... since I =
don`t want=20
to subclass both of them... So I add my feature under <BR>&gt;&gt; =

CDOSEssionExtended.. and pass the CDOView in parameters)<BR>&gt; =
<BR>&gt;=20
The context/scope of invalidations is always the session.<BR>&gt; =
When an=20
InvalidationIndication arrives at the client session the following =

happens:<BR>&gt; <BR>&gt;&nbsp;&nbsp; public void=20
CDOSessionImpl.notifyInvalidation(long timeStamp, Set&lt;CDOID&gt; =

dirtyOIDs, CDOViewImpl excludedView)<BR>&gt;&nbsp;&nbsp;=20
{<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; dirtyOIDs =3D=20
=
Collections.unmodifiableSet(dirtyOIDs);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
for (CDOViewImpl view : =
getViews())<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp; if (view !=3D=20
excludedView)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
try<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
=
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
*view.notifyInvalidation(timeStamp,=20
=
dirtyOIDs);*<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp; catch=20
(RuntimeException=20
ex)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
=
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
=
OM.LOG.error(ex);<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=
=20
}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;=20
}<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; *fireEvent(new=20
InvalidationEvent(excludedView, timeStamp,=20
dirtyOIDs));*<BR>&gt;&nbsp;&nbsp; }<BR>&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; All views of the session are =
notified by=20
direct calls.</FONT></DIV><FONT face=3DArial size=3D2></FONT>
<DIV><FONT face=3DArial size=3D2><BR>&gt; If the transaction that =
caused the=20
invalidation is part of the same session it is excluded from=20
notification.<BR>&gt; After that all higher level listeners are =
notified,=20
for example CDOEditor.<BR>&gt; <BR>&gt; Why do you want to use =
CDOView as=20
the context?<BR>&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>Consumer always work=20
with views.. right ?&nbsp;EObject are attached to CDOView...=20
</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>When =
the user=20
activate this feature... The CDOView listen=20
to&nbsp;CDOevent</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>When =
I received event=20
I do the following</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>public=20
void notifyEvent(IEvent event) </FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>{</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>if (event=20
instanceof CDOSessionInvalidationEvent)</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>{</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; CDOSessionInvalidationEvent =
invalidateEvent =3D=20
(CDOSessionInvalidationEvent)event;</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; for (CDOID id :=20
invalidateEvent.getDirtyOIDs())</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; {</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if=20
(cdoView.isObjectRegistered(id))</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
{</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
EObject=20
object =3D cdoView.getObject(id);</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
=
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
InvalidateNotification invalidateObject =3D new=20
InvalidateNotification(object); </FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
object.eNotify( invalidateObject );</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
=
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;}</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
}</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; }</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>}</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></DIV>
<DIV><FONT face=3DArial size=3D2>Make sense ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>&gt; <BR>&gt;&gt;&gt; The =
CDOEditor can=20
update invalidated objects at once (was and will be =
<BR>&gt;&gt;&gt;=20
optional) because it listens to the CDOInvalidatenEvents of the=20
<BR>&gt;&gt;&gt; CDOSession.<BR>&gt;&gt;&gt; It's not the default=20
behaviour that invalidated objects are reloaded at =
<BR>&gt;&gt;&gt; once.=20
This is only a feature of the UI.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; =
Ahh, I=20
guess you want to use a similar mechanism (CDOEventHandler) to =
fire=20
<BR>&gt;&gt;&gt; notifications that are subclasses of =
<BR>&gt;&gt;&gt;=20
org.eclipse.emf.common.notify.Notification?<BR>&gt;&gt;&gt; Just =
like the=20
RESOLVED notifications...<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Yes, =
that seems=20
to be a nice feature. Please open a feature request so =
<BR>&gt;&gt;&gt;=20
that I can review yur patch.<BR>&gt;&gt;&gt;<BR>&gt;&gt; =
<BR>&gt;&gt; Do=20
you want me to redesign the code to show it how it should be ... =
or to=20
<BR>&gt;&gt; have the code with my CDOSessionExtended ?<BR>&gt; =
<BR>&gt;=20
If it's not too much work for you it's more convenient for me if =
you=20
attach a patch that shows how you would integrate it directly into =
the=20
existing code.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; <BR>&gt; Cheers<BR>&gt; =
/Eike<BR>&gt;=20
=
<BR>&gt;</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE ></BODY></HTML=
>

------=_NextPart_000_03DF_01C7ECF7.7ABE0820--
Re: [CDO][0.8.0] Information about development [message #95454 is a reply to message #95190] Sun, 02 September 2007 10:16 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Simon,
I have been following this thread and saw that your were referring to Teneo/Elver. I am curious are
you integrating Teneo/Hibernate with CDO or are you working on a direct Hibernate/CDO integration?

gr. Martin

Simon McDuff wrote:
> I forgot to answer that thread.. sorry..
>
> Here are some details about hibernate and dynamic. I didn`t test it.. but
> I`m pretty sure it supports dynamic model.
>
> http://www.elver.org/hibernate/dynamic.html
>
> Hibernate does support many things. For versionning... I planned to add a
> few attributes at the persistence layer. It will be configurable.
>
> Generic O/R mapping it is something that could go very far (if we talk about
> feature and optimization).
> I would not like to do my own implementation... it will be too time
> consuming!!!
>
> You are courageous. Good luck!!
>
> Simon
>
>
>
> "Eike Stepper" <stepper@sympedia.de> a écrit dans le message de news:
> famp7o$9pe$2@build.eclipse.org...
>> Simon,
>>
>> Good question, if I remember correctly the Hibernate project was not
>> started when I published the first version of of CDO.
>> And even later Hibernate was not able to work with dynamic models (I'm not
>> a Hibernate expert, so please correct me if I'm wrong).
>> Today I'm curious whether it will be easily possible to implement all the
>> advanced features of CDO (for example transparent versioning, branching in
>> the future) with Hibernate.
>> I hope I will be able to learn from your Hibernate based IStore
>> implementation ;-)
>>
>> Cheers
>> /Eike
>>
>>
>> Simon McDuff schrieb:
>>> I was looking at the file that was modified on the project... and it
>>> seems that your are building a generic framework to access relational
>>> database as well as a mapping strategy. Hibernate is already doing
>>> that...
>>> My question is the following.. What its the improvement you are doing
>>> that Hibernate doesn't have ? You probably have a good answer for me!!!
>>>
>>>
>>>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [CDO][0.8.0] Information about development [message #95469 is a reply to message #95454] Sun, 02 September 2007 11:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Hi Martin,

Simon can give you more details but I don't think he uses Teneo for his
Hibernate integration with CDO.
The reason is that he integrates with the CDO server which doesn't know
about EMF at all.
I believe Teneo integrates Hibernate with EMF on the client side. A CDO
client in turn doesn't know about DBs, JDBC or Hibernate.

Enjoy your weekend ;-)
/Eike

BTW. Are you planing to visit Eclipse Summit Europe?


Martin Taal schrieb:
> Hi Simon,
> I have been following this thread and saw that your were referring to
> Teneo/Elver. I am curious are you integrating Teneo/Hibernate with CDO
> or are you working on a direct Hibernate/CDO integration?
>
> gr. Martin
>
> Simon McDuff wrote:
>> I forgot to answer that thread.. sorry..
>>
>> Here are some details about hibernate and dynamic. I didn`t test it..
>> but I`m pretty sure it supports dynamic model.
>>
>> http://www.elver.org/hibernate/dynamic.html
>>
>> Hibernate does support many things. For versionning... I planned to
>> add a few attributes at the persistence layer. It will be configurable.
>>
>> Generic O/R mapping it is something that could go very far (if we
>> talk about feature and optimization).
>> I would not like to do my own implementation... it will be too time
>> consuming!!!
>>
>> You are courageous. Good luck!!
>>
>> Simon
>>
>>
>>
>> "Eike Stepper" <stepper@sympedia.de> a écrit dans le message de news:
>> famp7o$9pe$2@build.eclipse.org...
>>> Simon,
>>>
>>> Good question, if I remember correctly the Hibernate project was not
>>> started when I published the first version of of CDO.
>>> And even later Hibernate was not able to work with dynamic models
>>> (I'm not a Hibernate expert, so please correct me if I'm wrong).
>>> Today I'm curious whether it will be easily possible to implement
>>> all the advanced features of CDO (for example transparent
>>> versioning, branching in the future) with Hibernate.
>>> I hope I will be able to learn from your Hibernate based IStore
>>> implementation ;-)
>>>
>>> Cheers
>>> /Eike
>>>
>>>
>>> Simon McDuff schrieb:
>>>> I was looking at the file that was modified on the project... and
>>>> it seems that your are building a generic framework to access
>>>> relational database as well as a mapping strategy. Hibernate is
>>>> already doing that...
>>>> My question is the following.. What its the improvement you are
>>>> doing that Hibernate doesn't have ? You probably have a good answer
>>>> for me!!!
>>>>
>>>>
>>>>
>>
>>
>
>
Re: [CDO][0.8.0] Information about development [message #95500 is a reply to message #95454] Sun, 02 September 2007 19:03 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Hi Martin,

I`m working with a direct Hibernate/CDO integration (long-term plan) . But
I`m looking at teneo framework... because I assume it creates model in
hibernate from EMF. What we have it is something that looks like EMF... so
this project (teneo) as certainly code that I could inspire or I could use
at the beginning !!

But for performance reasons... I would like to go directly to Hibernate
without creating EObject...

DOo you have a idea of the overhead uses from Teneo on top of hibernate ?

Simon




"Martin Taal" <mtaal@elver.org> a
Re: [CDO][0.8.0] Information about development [message #95516 is a reply to message #95500] Sun, 02 September 2007 20:58 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Simon,
Yes Teneo creates a hibernate mapping from the ecore model (and the jpa-like annotations in the
ecore model). Teneo assumes that the objects implement EObject. So using emf/ecore is a prerequisite.
Teneo is not really placed on top of hibernate but more inside hibernate. It extends hibernate from
the inside by supplying different property accessors (and some other minor changes). So Teneo is
only visible in the initialization phase of an app. After getting the
sessionfactory/entitymanagerfactory from Teneo it is all direct hibernate from there.

The main difference between teneo with hibernate and straight hibernate is the use of different
property accessors. Hibernate uses reflection, while Teneo uses accessors which talk to the EMF
eGet/eSet methods. I am not sure if this a performance hit or benefit. My feel is that it does not
matter that much.

gr. Martin

Simon McDuff wrote:
> Hi Martin,
>
> I`m working with a direct Hibernate/CDO integration (long-term plan) . But
> I`m looking at teneo framework... because I assume it creates model in
> hibernate from EMF. What we have it is something that looks like EMF... so
> this project (teneo) as certainly code that I could inspire or I could use
> at the beginning !!
>
> But for performance reasons... I would like to go directly to Hibernate
> without creating EObject...
>
> DOo you have a idea of the overhead uses from Teneo on top of hibernate ?
>
> Simon
>
>
>
>
> "Martin Taal" <mtaal@elver.org> a écrit dans le message de news:
> fbe2ik$blk$1@build.eclipse.org...
>> Hi Simon,
>> I have been following this thread and saw that your were referring to
>> Teneo/Elver. I am curious are you integrating Teneo/Hibernate with CDO or
>> are you working on a direct Hibernate/CDO integration?
>>
>> gr. Martin
>>
>> Simon McDuff wrote:
>>> I forgot to answer that thread.. sorry..
>>>
>>> Here are some details about hibernate and dynamic. I didn`t test it.. but
>>> I`m pretty sure it supports dynamic model.
>>>
>>> http://www.elver.org/hibernate/dynamic.html
>>>
>>> Hibernate does support many things. For versionning... I planned to add a
>>> few attributes at the persistence layer. It will be configurable.
>>>
>>> Generic O/R mapping it is something that could go very far (if we talk
>>> about feature and optimization).
>>> I would not like to do my own implementation... it will be too time
>>> consuming!!!
>>>
>>> You are courageous. Good luck!!
>>>
>>> Simon
>>>
>>>
>>>
>>> "Eike Stepper" <stepper@sympedia.de> a écrit dans le message de news:
>>> famp7o$9pe$2@build.eclipse.org...
>>>> Simon,
>>>>
>>>> Good question, if I remember correctly the Hibernate project was not
>>>> started when I published the first version of of CDO.
>>>> And even later Hibernate was not able to work with dynamic models (I'm
>>>> not a Hibernate expert, so please correct me if I'm wrong).
>>>> Today I'm curious whether it will be easily possible to implement all
>>>> the advanced features of CDO (for example transparent versioning,
>>>> branching in the future) with Hibernate.
>>>> I hope I will be able to learn from your Hibernate based IStore
>>>> implementation ;-)
>>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>>
>>>> Simon McDuff schrieb:
>>>>> I was looking at the file that was modified on the project... and it
>>>>> seems that your are building a generic framework to access relational
>>>>> database as well as a mapping strategy. Hibernate is already doing
>>>>> that...
>>>>> My question is the following.. What its the improvement you are doing
>>>>> that Hibernate doesn't have ? You probably have a good answer for me!!!
>>>>>
>>>>>
>>>>>
>>>
>>
>> --
>>
>> With Regards, Martin Taal
>>
>> Springsite/Elver.org
>> Office: Hardwareweg 4, 3821 BV Amersfoort
>> Postal: Nassaulaan 7, 3941 EC Doorn
>> The Netherlands
>> Tel: +31 (0)84 420 2397
>> Fax: +31 (0)84 225 9307
>> Mail: mtaal@springsite.com - mtaal@elver.org
>> Web: www.springsite.com - www.elver.org
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [CDO][0.8.0] Information about development [message #95561 is a reply to message #95516] Sun, 02 September 2007 22:18 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
This is good the hear.

So probably I will get a look at your code to understand how you extend
hibernate.
I`m sure I will learn a lot from there... since I`m not an expert in
hibernate.

My end goal is also to be able to use JPA at the consumer side.

Thank you Martin!

Simon

"Martin Taal" <mtaal@elver.org> a
Re: [CDO][0.8.0] Information about development [message #95702 is a reply to message #95469] Mon, 03 September 2007 12:30 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Eike,
Teneo is used server side also by some people. But they code the client server communication
themselves. It would be very interesting to have an integration between Teneo/hibernate and
cdo-server to also allow Teneo users to benefit from your client-server framework.

Because a teneo/hibernate user does not really 'see' Teneo (after initialization he/she works with
straight hibernate and emf generated java) it would mean (afaics) that a cdo-hibernate integration
(what Simon is working on) will also cover cdo-hibernate/teneo. Thereby making cdo client-server
available for teneo users. In practice there will for sure be some obstacles but therefore my interest.

btw, I am not yet sure if I will be going to eclipse summit.

gr. Martin

Eike Stepper wrote:
> Hi Martin,
>
> Simon can give you more details but I don't think he uses Teneo for his
> Hibernate integration with CDO.
> The reason is that he integrates with the CDO server which doesn't know
> about EMF at all.
> I believe Teneo integrates Hibernate with EMF on the client side. A CDO
> client in turn doesn't know about DBs, JDBC or Hibernate.
>
> Enjoy your weekend ;-)
> /Eike
>
> BTW. Are you planing to visit Eclipse Summit Europe?
>
>
> Martin Taal schrieb:
>> Hi Simon,
>> I have been following this thread and saw that your were referring to
>> Teneo/Elver. I am curious are you integrating Teneo/Hibernate with CDO
>> or are you working on a direct Hibernate/CDO integration?
>>
>> gr. Martin
>>
>> Simon McDuff wrote:
>>> I forgot to answer that thread.. sorry..
>>>
>>> Here are some details about hibernate and dynamic. I didn`t test it..
>>> but I`m pretty sure it supports dynamic model.
>>>
>>> http://www.elver.org/hibernate/dynamic.html
>>>
>>> Hibernate does support many things. For versionning... I planned to
>>> add a few attributes at the persistence layer. It will be configurable.
>>>
>>> Generic O/R mapping it is something that could go very far (if we
>>> talk about feature and optimization).
>>> I would not like to do my own implementation... it will be too time
>>> consuming!!!
>>>
>>> You are courageous. Good luck!!
>>>
>>> Simon
>>>
>>>
>>>
>>> "Eike Stepper" <stepper@sympedia.de> a écrit dans le message de news:
>>> famp7o$9pe$2@build.eclipse.org...
>>>> Simon,
>>>>
>>>> Good question, if I remember correctly the Hibernate project was not
>>>> started when I published the first version of of CDO.
>>>> And even later Hibernate was not able to work with dynamic models
>>>> (I'm not a Hibernate expert, so please correct me if I'm wrong).
>>>> Today I'm curious whether it will be easily possible to implement
>>>> all the advanced features of CDO (for example transparent
>>>> versioning, branching in the future) with Hibernate.
>>>> I hope I will be able to learn from your Hibernate based IStore
>>>> implementation ;-)
>>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>>
>>>> Simon McDuff schrieb:
>>>>> I was looking at the file that was modified on the project... and
>>>>> it seems that your are building a generic framework to access
>>>>> relational database as well as a mapping strategy. Hibernate is
>>>>> already doing that...
>>>>> My question is the following.. What its the improvement you are
>>>>> doing that Hibernate doesn't have ? You probably have a good answer
>>>>> for me!!!
>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [CDO][0.8.0] Information about development [message #95731 is a reply to message #95702] Mon, 03 September 2007 13:02 Go to previous message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Hi Martin,

I guess that people who use Teneo at their server side also have EMF at
their server side so that Teneo can mediate between EMF and Hibernate.
The situation with CDO is a bit different (please correct me if I'm
wrong with Teneo):
- The CDO client framework mediates between EMF and the CDO protocol (a
Net4j custom application protocol)
- The CDO server framework mediates between the CDO protocol and the CDO
storage framework (my mapper as RI, Simon has implementations for OODB
and Hibernate)

Of course if your server side users need a really good client/server
communications framework (fast, scalable, NIO based buffered
non-blocking, convenient, ...) I'd appreciate if they take a look at
Net4j ;-)
I can help if there is interest.

Cheers
/Eike


Martin Taal schrieb:
> Hi Eike,
> Teneo is used server side also by some people. But they code the
> client server communication themselves. It would be very interesting
> to have an integration between Teneo/hibernate and cdo-server to also
> allow Teneo users to benefit from your client-server framework.
>
> Because a teneo/hibernate user does not really 'see' Teneo (after
> initialization he/she works with straight hibernate and emf generated
> java) it would mean (afaics) that a cdo-hibernate integration (what
> Simon is working on) will also cover cdo-hibernate/teneo. Thereby
> making cdo client-server available for teneo users. In practice there
> will for sure be some obstacles but therefore my interest.
>
> btw, I am not yet sure if I will be going to eclipse summit.
>
> gr. Martin
>
> Eike Stepper wrote:
>> Hi Martin,
>>
>> Simon can give you more details but I don't think he uses Teneo for
>> his Hibernate integration with CDO.
>> The reason is that he integrates with the CDO server which doesn't
>> know about EMF at all.
>> I believe Teneo integrates Hibernate with EMF on the client side. A
>> CDO client in turn doesn't know about DBs, JDBC or Hibernate.
>>
>> Enjoy your weekend ;-)
>> /Eike
>>
>> BTW. Are you planing to visit Eclipse Summit Europe?
>>
>>
>> Martin Taal schrieb:
>>> Hi Simon,
>>> I have been following this thread and saw that your were referring
>>> to Teneo/Elver. I am curious are you integrating Teneo/Hibernate
>>> with CDO or are you working on a direct Hibernate/CDO integration?
>>>
>>> gr. Martin
>>>
>>> Simon McDuff wrote:
>>>> I forgot to answer that thread.. sorry..
>>>>
>>>> Here are some details about hibernate and dynamic. I didn`t test
>>>> it.. but I`m pretty sure it supports dynamic model.
>>>>
>>>> http://www.elver.org/hibernate/dynamic.html
>>>>
>>>> Hibernate does support many things. For versionning... I planned to
>>>> add a few attributes at the persistence layer. It will be
>>>> configurable.
>>>>
>>>> Generic O/R mapping it is something that could go very far (if we
>>>> talk about feature and optimization).
>>>> I would not like to do my own implementation... it will be too time
>>>> consuming!!!
>>>>
>>>> You are courageous. Good luck!!
>>>>
>>>> Simon
>>>>
>>>>
>>>>
>>>> "Eike Stepper" <stepper@sympedia.de> a écrit dans le message de
>>>> news: famp7o$9pe$2@build.eclipse.org...
>>>>> Simon,
>>>>>
>>>>> Good question, if I remember correctly the Hibernate project was
>>>>> not started when I published the first version of of CDO.
>>>>> And even later Hibernate was not able to work with dynamic models
>>>>> (I'm not a Hibernate expert, so please correct me if I'm wrong).
>>>>> Today I'm curious whether it will be easily possible to implement
>>>>> all the advanced features of CDO (for example transparent
>>>>> versioning, branching in the future) with Hibernate.
>>>>> I hope I will be able to learn from your Hibernate based IStore
>>>>> implementation ;-)
>>>>>
>>>>> Cheers
>>>>> /Eike
>>>>>
>>>>>
>>>>> Simon McDuff schrieb:
>>>>>> I was looking at the file that was modified on the project... and
>>>>>> it seems that your are building a generic framework to access
>>>>>> relational database as well as a mapping strategy. Hibernate is
>>>>>> already doing that...
>>>>>> My question is the following.. What its the improvement you are
>>>>>> doing that Hibernate doesn't have ? You probably have a good
>>>>>> answer for me!!!
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>
>>>
>
>
Re: [CDO][0.8.0] Information about development [message #609515 is a reply to message #94050] Fri, 24 August 2007 14:16 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6629
Registered: July 2009
Senior Member
Simon,

Good question, if I remember correctly the Hibernate project was not
started when I published the first version of of CDO.
And even later Hibernate was not able to work with dynamic models (I'm
not a Hibernate expert, so please correct me if I'm wrong).
Today I'm curious whether it will be easily possible to implement all
the advanced features of CDO (for example transparent versioning,
branching in the future) with Hibernate.
I hope I will be able to learn from your Hibernate based IStore
implementation ;-)

Cheers
/Eike


Simon McDuff schrieb:
> I was looking at the file that was modified on the project... and it seems
> that your are building a generic framework to access relational database as
> well as a mapping strategy. Hibernate is already doing that...
> My question is the following.. What its the improvement you are doing that
> Hibernate doesn't have ? You probably have a good answer for me!!!
>
>
>


Re: [CDO][0.8.0] Information about development [message #609595 is a reply to message #94080] Fri, 31 August 2007 18:45 Go to previous message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Eike,

I would also like to add that the Hibernate solution does not provide
client change notifications, as CDO does.

Mark.
Re: [CDO][0.8.0] Information about development [message #609597 is a reply to message #95114] Fri, 31 August 2007 19:52 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6629
Registered: July 2009
Senior Member
Mark,

I suspect that Simon is aware of that.
The new CDO server has an extensible storage framework for which Simon
is currently about to develop a Hibernate implementation.
With that you'd have Hibernate at the CDO server and still have change
notifications at the CDO clients.
Simon, correct?

Cheers
/Eike


Mark schrieb:
> Eike,
>
> I would also like to add that the Hibernate solution does not provide
> client change notifications, as CDO does.
>
> Mark.
>


Re: [CDO][0.8.0] Information about development [message #609599 is a reply to message #95144] Sat, 01 September 2007 00:25 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Yes . This is correct Eike.

Mark,
don`t forget that you will need to modify objects through CDO to have the
modifications.

If you have
- client A and B that access you database through CDO
- client C and D that access your database through hibernate directly.

Changes made by A will only notify B
Changes made by B will only notify A
Changes made by C will not notify anybody.
Changes made by D will not notify anybody.

For the notification process, I have also added a feature to be able to be
notify through the EMF notifications.

EObject objectOfInterest = .....

objectOfInterest.eAdapter( eAdapter );

You will receive all events. If you receive [EInvalidationObject extends
Notification] it is because the objects have been invalidate. At this point
you can do whatever you would like.

This feature is in experimentation... but seem to work fine.

What do you think of that feature Eike ?

Have a nice day.


"Eike Stepper" <stepper@sympedia.de> a
Re: [CDO][0.8.0] Information about development [message #609600 is a reply to message #94080] Sat, 01 September 2007 00:46 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
I forgot to answer that thread.. sorry..

Here are some details about hibernate and dynamic. I didn`t test it.. but
I`m pretty sure it supports dynamic model.

http://www.elver.org/hibernate/dynamic.html

Hibernate does support many things. For versionning... I planned to add a
few attributes at the persistence layer. It will be configurable.

Generic O/R mapping it is something that could go very far (if we talk about
feature and optimization).
I would not like to do my own implementation... it will be too time
consuming!!!

You are courageous. Good luck!!

Simon



"Eike Stepper" <stepper@sympedia.de> a
Re: [CDO][0.8.0] Information about development [message #609602 is a reply to message #95175] Sat, 01 September 2007 05:22 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6629
Registered: July 2009
Senior Member
Simon McDuff schrieb:
> Yes . This is correct Eike.
>
> Mark,
> don`t forget that you will need to modify objects through CDO to have the
> modifications.
>
> If you have
> - client A and B that access you database through CDO
> - client C and D that access your database through hibernate directly.
>
> Changes made by A will only notify B
> Changes made by B will only notify A
> Changes made by C will not notify anybody.
> Changes made by D will not notify anybody.
>
> For the notification process, I have also added a feature to be able to be
> notify through the EMF notifications.
>
> EObject objectOfInterest = .....
>
> objectOfInterest.eAdapter( eAdapter );
>
Should that be objectOfInterest.eAdapters().add(eAdapter) ?

> You will receive all events. If you receive [EInvalidationObject extends
> Notification] it is because the objects have been invalidate. At this point
> you can do whatever you would like.
>
> This feature is in experimentation... but seem to work fine.
>
> What do you think of that feature Eike ?
>
I'm not sure if I understand this. Could you please explain it once more?
Currently the process of *invalidation* doesn't directly lead to EMF
*notification*, that's true.
And intended since it is not a modification of values at once.
But subsequent access to an invalidated object will lead to automatic
reload.

The CDOEditor can update invalidated objects at once (was and will be
optional) because it listens to the CDOInvalidatenEvents of the CDOSession.
It's not the default behaviour that invalidated objects are reloaded at
once. This is only a feature of the UI.

Ahh, I guess you want to use a similar mechanism (CDOEventHandler) to
fire notifications that are subclasses of
org.eclipse.emf.common.notify.Notification?
Just like the RESOLVED notifications...

Yes, that seems to be a nice feature. Please open a feature request so
that I can review yur patch.

Cheers
/Eike


Re: [CDO][0.8.0] Information about development [message #609603 is a reply to message #95190] Sat, 01 September 2007 05:39 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6629
Registered: July 2009
Senior Member
Simon McDuff schrieb:
> I forgot to answer that thread.. sorry..
>
> Here are some details about hibernate and dynamic. I didn`t test it.. but
> I`m pretty sure it supports dynamic model.
>
> http://www.elver.org/hibernate/dynamic.html
>
> Hibernate does support many things. For versionning... I planned to add a
> few attributes at the persistence layer. It will be configurable.
>
> Generic O/R mapping it is something that could go very far (if we talk about
> feature and optimization).
>
As I said, I'm really nervous to see your code ;-)
It will for sure be good to have different implementations/integrations
of the storage layer.
People will want to choose different ones depending on a variety of reasons.

> I would not like to do my own implementation... it will be too time
> consuming!!!
>
> You are courageous. Good luck!!
>
The mapping layer I'm developing has different requirements than
Hibernate which makes it much easier for me to implement it.
For example I don't want to support all possible mapping constructs or
existing DB layouts.
Nevertheless the new version is supporting more mappings and strategies
than the 0.7.0 version.

Classes:
- ONE_TABLE_PER_CLASS_IN_HIERARCHY (vertical mapping)
- ONE_TABLE_PER_CONCRETE_CLASS (horizontal mapping)
- ONE_TABLE_PER_DATA_TYPE (planned)

To-One-References:
- LIKE_ATTRIBUTES
- LIKE_TO_MANY_REFERENCES

To-Many-References:
- ONE_TABLE_PER_REFERENCE
- ONE_TABLE_PER_CLASS
- ONE_TABLE_PER_PACKAGE
- ONE_TABLE_PER_REPOSITORY
- LIKE_ATTRIBUTES (String based ID list)

All of them will optionally support transparent versioning and
historical auditing as well.

Cheers
/Eike


Re: [CDO][0.8.0] Information about development [message #609605 is a reply to message #95218] Sat, 01 September 2007 09:53 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
"Eike Stepper" <stepper@sympedia.de> a
Re: [CDO][0.8.0] Information about development [message #609606 is a reply to message #95232] Sat, 01 September 2007 09:57 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Also,
if you are using hibernate through JPA.. and would like to access CDO server
.... You should not change any of your code... or almost.... and your
application should still work.

Specific feature that hibernate uses without going through JPA interface ..
will not be supported..

This will be nice !!! (I hope)


"Eike Stepper" <stepper@sympedia.de> a
Re: [CDO][0.8.0] Information about development [message #609608 is a reply to message #95264] Sat, 01 September 2007 10:29 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6629
Registered: July 2009
Senior Member
Simon McDuff schrieb:
>>> You will receive all events. If you receive [EInvalidationObject extends
>>> Notification] it is because the objects have been invalidate. At this
>>> point you can do whatever you would like.
>>>
>>> This feature is in experimentation... but seem to work fine.
>>>
>>> What do you think of that feature Eike ?
>>>
>> I'm not sure if I understand this. Could you please explain it once more?
>> Currently the process of *invalidation* doesn't directly lead to EMF
>> *notification*, that's true.
>> And intended since it is not a modification of values at once.
>> But subsequent access to an invalidated object will lead to automatic
>> reload.
>>
> I have added one interface name InvalidateNotification (extends
> Notification) and InvalidationInvocationImpl (implements
> InvalidateNotifcation).
> The goal here is to simplify the user...CDO will notify with a
> CDOSessionInvalidationEvent.
> CDOSessionInvalidationEvent contains a list of CDOID. To simplify the user
> that are interested in a special object... they only ned to
>
> objectOfInterest.eAdapters().add(eAdapter)
>
> And they will be notify.
>
> CDOView has a feature called enableInvalidateNotifications to determine
> wether or not a specific view should notify invalidation.
>
> (Right now, I put it under CDOSessionExtended... and I take the CDOView in
> parameters... since I can only extend CDOTransaction... and not CDOViewImpl
> ... since I don`t want to subclass both of them... So I add my feature under
> CDOSEssionExtended.. and pass the CDOView in parameters)

The context/scope of invalidations is always the session.
When an InvalidationIndication arrives at the client session the following happens:

public void CDOSessionImpl.notifyInvalidation(long timeStamp, Set<CDOID> dirtyOIDs, CDOViewImpl excludedView)
{
dirtyOIDs = Collections.unmodifiableSet(dirtyOIDs);
for (CDOViewImpl view : getViews())
{
if (view != excludedView)
{
try
{
*view.notifyInvalidation(timeStamp, dirtyOIDs);*
}
catch (RuntimeException ex)
{
OM.LOG.error(ex);
}
}
}

*fireEvent(new InvalidationEvent(excludedView, timeStamp, dirtyOIDs));*
}

All views of the session are notified by direct calls.
If the transaction that caused the invalidation is part of the same session it is excluded from notification.
After that all higher level listeners are notified, for example CDOEditor.

Why do you want to use CDOView as the context?


>> The CDOEditor can update invalidated objects at once (was and will be
>> optional) because it listens to the CDOInvalidatenEvents of the
>> CDOSession.
>> It's not the default behaviour that invalidated objects are reloaded at
>> once. This is only a feature of the UI.
>>
>> Ahh, I guess you want to use a similar mechanism (CDOEventHandler) to fire
>> notifications that are subclasses of
>> org.eclipse.emf.common.notify.Notification?
>> Just like the RESOLVED notifications...
>>
>> Yes, that seems to be a nice feature. Please open a feature request so
>> that I can review yur patch.
>>
>
> Do you want me to redesign the code to show it how it should be ... or to
> have the code with my CDOSessionExtended ?

If it's not too much work for you it's more convenient for me if you attach a patch that shows how you would integrate it directly into the existing code.

Cheers
/Eike


Re: [CDO][0.8.0] Information about development [message #609609 is a reply to message #95309] Sat, 01 September 2007 12:27 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0374_01C7EC71.DF2C23E0
Content-Type: text/plain;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable


"Eike Stepper" <stepper@sympedia.de> a =E9crit dans le message de news: =
fbbeof$iun$1@build.eclipse.org...
> Simon McDuff schrieb:
>>>> You will receive all events. If you receive [EInvalidationObject =
extends=20
>>>> Notification] it is because the objects have been invalidate. At =
this=20
>>>> point you can do whatever you would like.
>>>>
>>>> This feature is in experimentation... but seem to work fine.
>>>>
>>>> What do you think of that feature Eike ?
>>>>
>>> I'm not sure if I understand this. Could you please explain it once =
more?
>>> Currently the process of *invalidation* doesn't directly lead to EMF =

>>> *notification*, that's true.
>>> And intended since it is not a modification of values at once.
>>> But subsequent access to an invalidated object will lead to =
automatic=20
>>> reload.
>>>
>> I have added one interface name InvalidateNotification (extends=20
>> Notification) and InvalidationInvocationImpl (implements=20
>> InvalidateNotifcation).
>> The goal here is to simplify the user...CDO will notify with a=20
>> CDOSessionInvalidationEvent.
>> CDOSessionInvalidationEvent contains a list of CDOID. To simplify =
the user=20
>> that are interested in a special object... they only ned to
>>=20
>> objectOfInterest.eAdapters().add(eAdapter)
>>=20
>> And they will be notify.
>>=20
>> CDOView has a feature called enableInvalidateNotifications to =
determine=20
>> wether or not a specific view should notify invalidation.
>>=20
>> (Right now, I put it under CDOSessionExtended... and I take the =
CDOView in=20
>> parameters... since I can only extend CDOTransaction... and not =
CDOViewImpl=20
>> ... since I don`t want to subclass both of them... So I add my =
feature under=20
>> CDOSEssionExtended.. and pass the CDOView in parameters)
>=20
> The context/scope of invalidations is always the session.
> When an InvalidationIndication arrives at the client session the =
following happens:
>=20
> public void CDOSessionImpl.notifyInvalidation(long timeStamp, =
Set<CDOID> dirtyOIDs, CDOViewImpl excludedView)
> {
> dirtyOIDs =3D Collections.unmodifiableSet(dirtyOIDs);
> for (CDOViewImpl view : getViews())
> {
> if (view !=3D excludedView)
> {
> try
> {
> *view.notifyInvalidation(timeStamp, dirtyOIDs);*
> }
> catch (RuntimeException ex)
> {
> OM.LOG.error(ex);
> }
> }
> }
>=20
> *fireEvent(new InvalidationEvent(excludedView, timeStamp, =
dirtyOIDs));*
> }
>=20
> All views of the session are notified by direct calls.

> If the transaction that caused the invalidation is part of the same =
session it is excluded from notification.
> After that all higher level listeners are notified, for example =
CDOEditor.
>=20
> Why do you want to use CDOView as the context?
>=20

Consumer always work with views.. right ? EObject are attached to =
CDOView...=20

When the user activate this feature... The CDOView listen to CDOevent

When I received event I do the following

public void notifyEvent(IEvent event)=20
{
if (event instanceof CDOSessionInvalidationEvent)
{
CDOSessionInvalidationEvent invalidateEvent =3D =
(CDOSessionInvalidationEvent)event;
for (CDOID id : invalidateEvent.getDirtyOIDs())
{
if (cdoView.isObjectRegistered(id))
{
EObject object =3D cdoView.getObject(id);
InvalidateNotification invalidateObject =3D new =
InvalidateNotification(object);=20
object.eNotify( invalidateObject );
}
}
}
}

Make sense ?

>=20
>>> The CDOEditor can update invalidated objects at once (was and will =
be=20
>>> optional) because it listens to the CDOInvalidatenEvents of the=20
>>> CDOSession.
>>> It's not the default behaviour that invalidated objects are reloaded =
at=20
>>> once. This is only a feature of the UI.
>>>
>>> Ahh, I guess you want to use a similar mechanism (CDOEventHandler) =
to fire=20
>>> notifications that are subclasses of=20
>>> org.eclipse.emf.common.notify.Notification?
>>> Just like the RESOLVED notifications...
>>>
>>> Yes, that seems to be a nice feature. Please open a feature request =
so=20
>>> that I can review yur patch.
>>>
>>=20
>> Do you want me to redesign the code to show it how it should be ... =
or to=20
>> have the code with my CDOSessionExtended ?
>=20
> If it's not too much work for you it's more convenient for me if you =
attach a patch that shows how you would integrate it directly into the =
existing code.
>=20
> Cheers
> /Eike
>=20
>
------=_NextPart_000_0374_01C7EC71.DF2C23E0
Content-Type: text/html;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-15">
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Eike Stepper" &lt;</FONT><A=20
href=3D"mailto:stepper@sympedia.de"><FONT face=3DArial=20
size=3D2>stepper@sympedia.de</FONT></A><FONT face=3DArial size=3D2>&gt; =
a =E9crit dans=20
le message de news: </FONT><A =
href=3D"mailto:fbbeof$iun$1@build.eclipse.org"><FONT=20
face=3DArial size=3D2>fbbeof$iun$1@build.eclipse.org</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; Simon McDuff =
schrieb:<BR>&gt;&gt;&gt;&gt; You=20
will receive all events. If you receive [EInvalidationObject extends=20
<BR>&gt;&gt;&gt;&gt; Notification]&nbsp; it is because the objects have =
been=20
invalidate. At this <BR>&gt;&gt;&gt;&gt; point you can do whatever you =
would=20
like.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; This feature is in=20
experimentation... but seem to work=20
fine.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; What do you think of that =
feature=20
Eike ?<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt; I'm not sure if I understand =
this.=20
Could you please explain it once more?<BR>&gt;&gt;&gt; Currently the =
process of=20
*invalidation* doesn't directly lead to EMF <BR>&gt;&gt;&gt; =
*notification*,=20
that's true.<BR>&gt;&gt;&gt; And intended since it is not a modification =
of=20
values at once.<BR>&gt;&gt;&gt; But subsequent access to an invalidated =
object=20
will lead to automatic <BR>&gt;&gt;&gt; =
reload.<BR>&gt;&gt;&gt;<BR>&gt;&gt; I=20
have added one interface name InvalidateNotification (extends =
<BR>&gt;&gt;=20
Notification) and InvalidationInvocationImpl (implements <BR>&gt;&gt;=20
InvalidateNotifcation).<BR>&gt;&gt; The goal here is to simplify the =
user...CDO=20
will notify with a <BR>&gt;&gt; CDOSessionInvalidationEvent.<BR>&gt;&gt; =

CDOSessionInvalidationEvent contains a list of CDOID.&nbsp; To simplify =
the user=20
<BR>&gt;&gt; that are interested in a special object... they only ned=20
to<BR>&gt;&gt; <BR>&gt;&gt;=20
objectOfInterest.eAdapters().add(eAdapter)<BR>&gt;&gt; <BR>&gt;&gt; And =
they=20
will be notify.<BR>&gt;&gt; <BR>&gt;&gt; CDOView has a feature called=20
enableInvalidateNotifications to determine <BR>&gt;&gt; wether or not a =
specific=20
view should notify invalidation.<BR>&gt;&gt; <BR>&gt;&gt; (Right now, I =
put it=20
under CDOSessionExtended... and I take the CDOView in <BR>&gt;&gt; =
parameters...=20
since I can only extend CDOTransaction... and not CDOViewImpl =
<BR>&gt;&gt; ...=20
since I don`t want to subclass both of them... So I add my feature under =

<BR>&gt;&gt; CDOSEssionExtended.. and pass the CDOView in =
parameters)<BR>&gt;=20
<BR>&gt; The context/scope of invalidations is always the =
session.<BR>&gt; When=20
an InvalidationIndication arrives at the client session the following=20
happens:<BR>&gt; <BR>&gt;&nbsp;&nbsp; public void=20
CDOSessionImpl.notifyInvalidation(long timeStamp, Set&lt;CDOID&gt; =
dirtyOIDs,=20
CDOViewImpl excludedView)<BR>&gt;&nbsp;&nbsp; =
{<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
dirtyOIDs =3D=20
Collections.unmodifiableSet(dirtyOIDs);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
for=20
(CDOViewImpl view : getViews())<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp; if (view !=3D=20
excludedView)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
try<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
*view.notifyInvalidation(timeStamp,=20
dirtyOIDs);*<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp; catch=20
(RuntimeException =
ex)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
OM.LOG.error(ex);<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=
=20
}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp; =
}<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
}<BR>&gt; <BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; *fireEvent(new=20
InvalidationEvent(excludedView, timeStamp, =
dirtyOIDs));*<BR>&gt;&nbsp;&nbsp;=20
}<BR>&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; All views of the session are =
notified by=20
direct calls.</FONT></DIV><FONT face=3DArial size=3D2>
<DIV><BR>&gt; If the transaction that caused the invalidation is part of =
the=20
same session it is excluded from notification.<BR>&gt; After that all =
higher=20
level listeners are notified, for example CDOEditor.<BR>&gt; <BR>&gt; =
Why do you=20
want to use CDOView as the context?<BR>&gt; </DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2>Consumer always work with views.. right =

?&nbsp;EObject are attached to CDOView... </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>When the user activate this feature... =
The CDOView=20
listen to&nbsp;CDOevent</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>When I received event I do the=20
following</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>public void =
notifyEvent(IEvent event)=20
</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>{</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>if (event instanceof=20
CDOSessionInvalidationEvent)</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>{</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;=20
CDOSessionInvalidationEvent invalidateEvent =3D=20
(CDOSessionInvalidationEvent)event;</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; for =
(CDOID id :=20
invalidateEvent.getDirtyOIDs())</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
{</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; if=20
(cdoView.isObjectRegistered(id))</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
{</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; EObject object =3D =
cdoView.getObject(id);</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial=20
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
InvalidateNotification invalidateObject =3D new =
InvalidateNotification(object);=20
</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; object.eNotify( invalidateObject );</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial=20
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;}</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
}</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
}</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></DIV>
<DIV>Make sense ?</DIV>
<DIV><BR>&gt; <BR>&gt;&gt;&gt; The CDOEditor can update invalidated =
objects at=20
once (was and will be <BR>&gt;&gt;&gt; optional) because it listens to =
the=20
CDOInvalidatenEvents of the <BR>&gt;&gt;&gt; CDOSession.<BR>&gt;&gt;&gt; =
It's=20
not the default behaviour that invalidated objects are reloaded at=20
<BR>&gt;&gt;&gt; once. This is only a feature of the=20
UI.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Ahh, I guess you want to use a =
similar=20
mechanism (CDOEventHandler) to fire <BR>&gt;&gt;&gt; notifications that =
are=20
subclasses of <BR>&gt;&gt;&gt;=20
org.eclipse.emf.common.notify.Notification?<BR>&gt;&gt;&gt; Just like =
the=20
RESOLVED notifications...<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Yes, that =
seems to be=20
a nice feature. Please open a feature request so <BR>&gt;&gt;&gt; that I =
can=20
review yur patch.<BR>&gt;&gt;&gt;<BR>&gt;&gt; <BR>&gt;&gt; Do you want =
me to=20
redesign the code to show it how it should be ... or to <BR>&gt;&gt; =
have the=20
code with my CDOSessionExtended ?<BR>&gt; <BR>&gt; If it's not too much =
work for=20
you it's more convenient for me if you attach a patch that shows how you =
would=20
integrate it directly into the existing code.</DIV>
<DIV>&gt; <BR>&gt; Cheers<BR>&gt; /Eike<BR>&gt;=20
<BR>&gt;</FONT></DIV></BODY></HTML>

------=_NextPart_000_0374_01C7EC71.DF2C23E0--
Re: [CDO][0.8.0] Information about development [message #609610 is a reply to message #95324] Sat, 01 September 2007 14:21 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6629
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010006040305060702040804
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Simon,

What you say makes sense.
Please attach the complete patch to a feature request so that I can see
how the parts work together.
If everything is ok I can merge your changes into the code base.

Cheers
/Eike


Simon McDuff schrieb:
>
> "Eike Stepper" <stepper@sympedia.de <mailto:stepper@sympedia.de>> a
>


Re: [CDO][0.8.0] Information about development [message #609611 is a reply to message #95345] Sat, 01 September 2007 14:22 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_03B3_01C7EC81.FB595320
Content-Type: text/plain;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

OK I will merge it with CDOViewIMpl (instead of my CDOSession) and =
create the patch.


"Eike Stepper" <stepper@sympedia.de> a =E9crit dans le message de =
news: fbbsh0$f41$1@build.eclipse.org...
Simon,

What you say makes sense.
Please attach the complete patch to a feature request so that I can =
see how the parts work together.
If everything is ok I can merge your changes into the code base.

Cheers
/Eike


Simon McDuff schrieb:=20

"Eike Stepper" <stepper@sympedia.de> a =E9crit dans le message de =
news: fbbeof$iun$1@build.eclipse.org...
> Simon McDuff schrieb:
>>>> You will receive all events. If you receive =
[EInvalidationObject extends=20
>>>> Notification] it is because the objects have been invalidate. =
At this=20
>>>> point you can do whatever you would like.
>>>>
>>>> This feature is in experimentation... but seem to work fine.
>>>>
>>>> What do you think of that feature Eike ?
>>>>
>>> I'm not sure if I understand this. Could you please explain it =
once more?
>>> Currently the process of *invalidation* doesn't directly lead to =
EMF=20
>>> *notification*, that's true.
>>> And intended since it is not a modification of values at once.
>>> But subsequent access to an invalidated object will lead to =
automatic=20
>>> reload.
>>>
>> I have added one interface name InvalidateNotification (extends=20
>> Notification) and InvalidationInvocationImpl (implements=20
>> InvalidateNotifcation).
>> The goal here is to simplify the user...CDO will notify with a=20
>> CDOSessionInvalidationEvent.
>> CDOSessionInvalidationEvent contains a list of CDOID. To =
simplify the user=20
>> that are interested in a special object... they only ned to
>>=20
>> objectOfInterest.eAdapters().add(eAdapter)
>>=20
>> And they will be notify.
>>=20
>> CDOView has a feature called enableInvalidateNotifications to =
determine=20
>> wether or not a specific view should notify invalidation.
>>=20
>> (Right now, I put it under CDOSessionExtended... and I take the =
CDOView in=20
>> parameters... since I can only extend CDOTransaction... and not =
CDOViewImpl=20
>> ... since I don`t want to subclass both of them... So I add my =
feature under=20
>> CDOSEssionExtended.. and pass the CDOView in parameters)
>=20
> The context/scope of invalidations is always the session.
> When an InvalidationIndication arrives at the client session the =
following happens:
>=20
> public void CDOSessionImpl.notifyInvalidation(long timeStamp, =
Set<CDOID> dirtyOIDs, CDOViewImpl excludedView)
> {
> dirtyOIDs =3D Collections.unmodifiableSet(dirtyOIDs);
> for (CDOViewImpl view : getViews())
> {
> if (view !=3D excludedView)
> {
> try
> {
> *view.notifyInvalidation(timeStamp, dirtyOIDs);*
> }
> catch (RuntimeException ex)
> {
> OM.LOG.error(ex);
> }
> }
> }
>=20
> *fireEvent(new InvalidationEvent(excludedView, timeStamp, =
dirtyOIDs));*
> }
>=20
> All views of the session are notified by direct calls.

> If the transaction that caused the invalidation is part of the =
same session it is excluded from notification.
> After that all higher level listeners are notified, for example =
CDOEditor.
>=20
> Why do you want to use CDOView as the context?
>=20

Consumer always work with views.. right ? EObject are attached to =
CDOView...=20

When the user activate this feature... The CDOView listen to =
CDOevent

When I received event I do the following

public void notifyEvent(IEvent event)=20
{
if (event instanceof CDOSessionInvalidationEvent)
{
CDOSessionInvalidationEvent invalidateEvent =3D =
(CDOSessionInvalidationEvent)event;
for (CDOID id : invalidateEvent.getDirtyOIDs())
{
if (cdoView.isObjectRegistered(id))
{
EObject object =3D cdoView.getObject(id);
InvalidateNotification invalidateObject =3D new =
InvalidateNotification(object);=20
object.eNotify( invalidateObject );
}
}
}
}

Make sense ?

>=20
>>> The CDOEditor can update invalidated objects at once (was and =
will be=20
>>> optional) because it listens to the CDOInvalidatenEvents of the=20
>>> CDOSession.
>>> It's not the default behaviour that invalidated objects are =
reloaded at=20
>>> once. This is only a feature of the UI.
>>>
>>> Ahh, I guess you want to use a similar mechanism =
(CDOEventHandler) to fire=20
>>> notifications that are subclasses of=20
>>> org.eclipse.emf.common.notify.Notification?
>>> Just like the RESOLVED notifications...
>>>
>>> Yes, that seems to be a nice feature. Please open a feature =
request so=20
>>> that I can review yur patch.
>>>
>>=20
>> Do you want me to redesign the code to show it how it should be =
.... or to=20
>> have the code with my CDOSessionExtended ?
>=20
> If it's not too much work for you it's more convenient for me if =
you attach a patch that shows how you would integrate it directly into =
the existing code.
>=20
> Cheers
> /Eike
>=20
>
------=_NextPart_000_03B3_01C7EC81.FB595320
Content-Type: text/html;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-15>
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR></HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>OK I will merge it with CDOViewIMpl =
(instead of my=20
CDOSession) and create the patch.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Eike Stepper" &lt;<A=20
href=3D"mailto:stepper@sympedia.de">stepper@sympedia.de</A>&gt; a =
=E9crit dans le=20
message de news: <A=20
=
href=3D"mailto:fbbsh0$f41$1@build.eclipse.org">fbbsh0$f41$1@build.eclipse=
..org</A>...</DIV>Simon,<BR><BR>What=20
you say makes sense.<BR>Please attach the complete patch to a feature =
request=20
so that I can see how the parts work together.<BR>If everything is ok =
I can=20
merge your changes into the code =
base.<BR><BR>Cheers<BR>/Eike<BR><BR><BR>Simon=20
McDuff schrieb:=20
<BLOCKQUOTE cite=3Dmid:fbblqo$46j$1@build.eclipse.org type=3D"cite">
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
<STYLE></STYLE>

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Eike Stepper" &lt;</FONT><A=20
href=3D"mailto:stepper@sympedia.de" moz-do-not-send=3D"true"><FONT =
face=3DArial=20
size=3D2>stepper@sympedia.de</FONT></A><FONT face=3DArial =
size=3D2>&gt; a =E9crit=20
dans le message de news: </FONT><A=20
href=3D"mailto:fbbeof$iun$1@build.eclipse.org" =
moz-do-not-send=3D"true"><FONT=20
face=3DArial size=3D2>fbbeof$iun$1@build.eclipse.org</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; Simon McDuff =
schrieb:<BR>&gt;&gt;&gt;&gt;=20
You will receive all events. If you receive [EInvalidationObject =
extends=20
<BR>&gt;&gt;&gt;&gt; Notification]&nbsp; it is because the objects =
have been=20
invalidate. At this <BR>&gt;&gt;&gt;&gt; point you can do whatever =
you would=20
like.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; This feature is in=20
experimentation... but seem to work=20
fine.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; What do you think of =
that=20
feature Eike ?<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt; I'm not sure if I =

understand this. Could you please explain it once =
more?<BR>&gt;&gt;&gt;=20
Currently the process of *invalidation* doesn't directly lead to EMF =

<BR>&gt;&gt;&gt; *notification*, that's true.<BR>&gt;&gt;&gt; And =
intended=20
since it is not a modification of values at once.<BR>&gt;&gt;&gt; =
But=20
subsequent access to an invalidated object will lead to automatic=20
<BR>&gt;&gt;&gt; reload.<BR>&gt;&gt;&gt;<BR>&gt;&gt; I have added =
one=20
interface name InvalidateNotification (extends <BR>&gt;&gt; =
Notification)=20
and InvalidationInvocationImpl (implements <BR>&gt;&gt;=20
InvalidateNotifcation).<BR>&gt;&gt; The goal here is to simplify the =

user...CDO will notify with a <BR>&gt;&gt;=20
CDOSessionInvalidationEvent.<BR>&gt;&gt; CDOSessionInvalidationEvent =

contains a list of CDOID.&nbsp; To simplify the user <BR>&gt;&gt; =
that are=20
interested in a special object... they only ned to<BR>&gt;&gt; =
<BR>&gt;&gt;=20
objectOfInterest.eAdapters().add(eAdapter)<BR>&gt;&gt; <BR>&gt;&gt; =
And they=20
will be notify.<BR>&gt;&gt; <BR>&gt;&gt; CDOView has a feature =
called=20
enableInvalidateNotifications to determine <BR>&gt;&gt; wether or =
not a=20
specific view should notify invalidation.<BR>&gt;&gt; <BR>&gt;&gt; =
(Right=20
now, I put it under CDOSessionExtended... and I take the CDOView in=20
<BR>&gt;&gt; parameters... since I can only extend CDOTransaction... =
and not=20
CDOViewImpl <BR>&gt;&gt; ... since I don`t want to subclass both of =
them...=20
So I add my feature under <BR>&gt;&gt; CDOSEssionExtended.. and pass =
the=20
CDOView in parameters)<BR>&gt; <BR>&gt; The context/scope of =
invalidations=20
is always the session.<BR>&gt; When an InvalidationIndication =
arrives at the=20
client session the following happens:<BR>&gt; <BR>&gt;&nbsp;&nbsp; =
public=20
void CDOSessionImpl.notifyInvalidation(long timeStamp, =
Set&lt;CDOID&gt;=20
dirtyOIDs, CDOViewImpl excludedView)<BR>&gt;&nbsp;&nbsp;=20
{<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; dirtyOIDs =3D=20
=
Collections.unmodifiableSet(dirtyOIDs);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
for=20
(CDOViewImpl view : getViews())<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp; if (view !=3D=20
excludedView)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
try<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
=
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
*view.notifyInvalidation(timeStamp,=20
dirtyOIDs);*<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp; =

}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp; catch=20
(RuntimeException=20
ex)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
=
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
=
OM.LOG.error(ex);<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=
=20
}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;=20
}<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&gt; =
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
*fireEvent(new InvalidationEvent(excludedView, timeStamp,=20
dirtyOIDs));*<BR>&gt;&nbsp;&nbsp; }<BR>&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; All views of the session are =
notified by=20
direct calls.</FONT></DIV><FONT face=3DArial size=3D2></FONT>
<DIV><FONT face=3DArial size=3D2><BR>&gt; If the transaction that =
caused the=20
invalidation is part of the same session it is excluded from=20
notification.<BR>&gt; After that all higher level listeners are =
notified,=20
for example CDOEditor.<BR>&gt; <BR>&gt; Why do you want to use =
CDOView as=20
the context?<BR>&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>Consumer always work=20
with views.. right ?&nbsp;EObject are attached to CDOView...=20
</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>When =
the user activate=20
this feature... The CDOView listen =
to&nbsp;CDOevent</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>When I =
received event I=20
do the following</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>public void=20
notifyEvent(IEvent event) </FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>{</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>if (event=20
instanceof CDOSessionInvalidationEvent)</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>{</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; CDOSessionInvalidationEvent =
invalidateEvent =3D=20
(CDOSessionInvalidationEvent)event;</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; for (CDOID id :=20
invalidateEvent.getDirtyOIDs())</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; {</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if=20
(cdoView.isObjectRegistered(id))</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
EObject=20
object =3D cdoView.getObject(id);</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
=
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
InvalidateNotification invalidateObject =3D new=20
InvalidateNotification(object); </FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
object.eNotify( invalidateObject );</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
=
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;}</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; }</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>}</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></DIV>
<DIV><FONT face=3DArial size=3D2>Make sense ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>&gt; <BR>&gt;&gt;&gt; The =
CDOEditor can=20
update invalidated objects at once (was and will be <BR>&gt;&gt;&gt; =

optional) because it listens to the CDOInvalidatenEvents of the=20
<BR>&gt;&gt;&gt; CDOSession.<BR>&gt;&gt;&gt; It's not the default =
behaviour=20
that invalidated objects are reloaded at <BR>&gt;&gt;&gt; once. This =
is only=20
a feature of the UI.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Ahh, I guess =
you want=20
to use a similar mechanism (CDOEventHandler) to fire =
<BR>&gt;&gt;&gt;=20
notifications that are subclasses of <BR>&gt;&gt;&gt;=20
org.eclipse.emf.common.notify.Notification?<BR>&gt;&gt;&gt; Just =
like the=20
RESOLVED notifications...<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Yes, that =
seems to=20
be a nice feature. Please open a feature request so <BR>&gt;&gt;&gt; =
that I=20
can review yur patch.<BR>&gt;&gt;&gt;<BR>&gt;&gt; <BR>&gt;&gt; Do =
you want=20
me to redesign the code to show it how it should be ... or to =
<BR>&gt;&gt;=20
have the code with my CDOSessionExtended ?<BR>&gt; <BR>&gt; If it's =
not too=20
much work for you it's more convenient for me if you attach a patch =
that=20
shows how you would integrate it directly into the existing=20
code.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; <BR>&gt; Cheers<BR>&gt; =
/Eike<BR>&gt;=20
<BR>&gt;</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY ></HTML>

------=_NextPart_000_03B3_01C7EC81.FB595320--
Re: [CDO][0.8.0] Information about development [message #609613 is a reply to message #95360] Sun, 02 September 2007 04:23 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_03DF_01C7ECF7.7ABE0820
Content-Type: text/plain;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D201997
"Simon McDuff" <smcduff@hotmail.com> a =E9crit dans le message de =
news: fbbsiv$gmp$1@build.eclipse.org...
OK I will merge it with CDOViewIMpl (instead of my CDOSession) and =
create the patch.


"Eike Stepper" <stepper@sympedia.de> a =E9crit dans le message de =
news: fbbsh0$f41$1@build.eclipse.org...
Simon,

What you say makes sense.
Please attach the complete patch to a feature request so that I can =
see how the parts work together.
If everything is ok I can merge your changes into the code base.

Cheers
/Eike


Simon McDuff schrieb:=20

"Eike Stepper" <stepper@sympedia.de> a =E9crit dans le message de =
news: fbbeof$iun$1@build.eclipse.org...
> Simon McDuff schrieb:
>>>> You will receive all events. If you receive =
[EInvalidationObject extends=20
>>>> Notification] it is because the objects have been =
invalidate. At this=20
>>>> point you can do whatever you would like.
>>>>
>>>> This feature is in experimentation... but seem to work fine.
>>>>
>>>> What do you think of that feature Eike ?
>>>>
>>> I'm not sure if I understand this. Could you please explain it =
once more?
>>> Currently the process of *invalidation* doesn't directly lead =
to EMF=20
>>> *notification*, that's true.
>>> And intended since it is not a modification of values at once.
>>> But subsequent access to an invalidated object will lead to =
automatic=20
>>> reload.
>>>
>> I have added one interface name InvalidateNotification (extends =

>> Notification) and InvalidationInvocationImpl (implements=20
>> InvalidateNotifcation).
>> The goal here is to simplify the user...CDO will notify with a=20
>> CDOSessionInvalidationEvent.
>> CDOSessionInvalidationEvent contains a list of CDOID. To =
simplify the user=20
>> that are interested in a special object... they only ned to
>>=20
>> objectOfInterest.eAdapters().add(eAdapter)
>>=20
>> And they will be notify.
>>=20
>> CDOView has a feature called enableInvalidateNotifications to =
determine=20
>> wether or not a specific view should notify invalidation.
>>=20
>> (Right now, I put it under CDOSessionExtended... and I take the =
CDOView in=20
>> parameters... since I can only extend CDOTransaction... and not =
CDOViewImpl=20
>> ... since I don`t want to subclass both of them... So I add my =
feature under=20
>> CDOSEssionExtended.. and pass the CDOView in parameters)
>=20
> The context/scope of invalidations is always the session.
> When an InvalidationIndication arrives at the client session the =
following happens:
>=20
> public void CDOSessionImpl.notifyInvalidation(long timeStamp, =
Set<CDOID> dirtyOIDs, CDOViewImpl excludedView)
> {
> dirtyOIDs =3D Collections.unmodifiableSet(dirtyOIDs);
> for (CDOViewImpl view : getViews())
> {
> if (view !=3D excludedView)
> {
> try
> {
> *view.notifyInvalidation(timeStamp, dirtyOIDs);*
> }
> catch (RuntimeException ex)
> {
> OM.LOG.error(ex);
> }
> }
> }
>=20
> *fireEvent(new InvalidationEvent(excludedView, timeStamp, =
dirtyOIDs));*
> }
>=20
> All views of the session are notified by direct calls.

> If the transaction that caused the invalidation is part of the =
same session it is excluded from notification.
> After that all higher level listeners are notified, for example =
CDOEditor.
>=20
> Why do you want to use CDOView as the context?
>=20

Consumer always work with views.. right ? EObject are attached to =
CDOView...=20

When the user activate this feature... The CDOView listen to =
CDOevent

When I received event I do the following

public void notifyEvent(IEvent event)=20
{
if (event instanceof CDOSessionInvalidationEvent)
{
CDOSessionInvalidationEvent invalidateEvent =3D =
(CDOSessionInvalidationEvent)event;
for (CDOID id : invalidateEvent.getDirtyOIDs())
{
if (cdoView.isObjectRegistered(id))
{
EObject object =3D cdoView.getObject(id);
InvalidateNotification invalidateObject =3D new =
InvalidateNotification(object);=20
object.eNotify( invalidateObject );
}
}
}
}

Make sense ?

>=20
>>> The CDOEditor can update invalidated objects at once (was and =
will be=20
>>> optional) because it listens to the CDOInvalidatenEvents of =
the=20
>>> CDOSession.
>>> It's not the default behaviour that invalidated objects are =
reloaded at=20
>>> once. This is only a feature of the UI.
>>>
>>> Ahh, I guess you want to use a similar mechanism =
(CDOEventHandler) to fire=20
>>> notifications that are subclasses of=20
>>> org.eclipse.emf.common.notify.Notification?
>>> Just like the RESOLVED notifications...
>>>
>>> Yes, that seems to be a nice feature. Please open a feature =
request so=20
>>> that I can review yur patch.
>>>
>>=20
>> Do you want me to redesign the code to show it how it should be =
.... or to=20
>> have the code with my CDOSessionExtended ?
>=20
> If it's not too much work for you it's more convenient for me if =
you attach a patch that shows how you would integrate it directly into =
the existing code.
>=20
> Cheers
> /Eike
>=20
>
------=_NextPart_000_03DF_01C7ECF7.7ABE0820
Content-Type: text/html;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-15>
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR></HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D201997">https://b=
ugs.eclipse.org/bugs/show_bug.cgi?id=3D201997</A></FONT></DIV >
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Simon McDuff" &lt;<A=20
href=3D"mailto:smcduff@hotmail.com">smcduff@hotmail.com</A>&gt; a =
=E9crit dans le=20
message de news: <A=20
=
href=3D"mailto:fbbsiv$gmp$1@build.eclipse.org">fbbsiv$gmp$1@build.eclipse=
..org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>OK I will merge it with CDOViewIMpl =
(instead of=20
my CDOSession) and create the patch.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Eike Stepper" &lt;<A=20
href=3D"mailto:stepper@sympedia.de">stepper@sympedia.de</A>&gt; a =
=E9crit dans=20
le message de news: <A=20
=
href=3D"mailto:fbbsh0$f41$1@build.eclipse.org">fbbsh0$f41$1@build.eclipse=
..org</A>...</DIV>Simon,<BR><BR>What=20
you say makes sense.<BR>Please attach the complete patch to a =
feature=20
request so that I can see how the parts work together.<BR>If =
everything is=20
ok I can merge your changes into the code=20
base.<BR><BR>Cheers<BR>/Eike<BR><BR><BR>Simon McDuff schrieb:=20
<BLOCKQUOTE cite=3Dmid:fbblqo$46j$1@build.eclipse.org type=3D"cite">
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
<STYLE></STYLE>

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Eike Stepper" &lt;</FONT><A=20
href=3D"mailto:stepper@sympedia.de" moz-do-not-send=3D"true"><FONT =
face=3DArial=20
size=3D2>stepper@sympedia.de</FONT></A><FONT face=3DArial =
size=3D2>&gt; a =E9crit=20
dans le message de news: </FONT><A=20
href=3D"mailto:fbbeof$iun$1@build.eclipse.org" =
moz-do-not-send=3D"true"><FONT=20
face=3DArial =
size=3D2>fbbeof$iun$1@build.eclipse.org</FONT></A><FONT=20
face=3DArial size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; Simon McDuff=20
schrieb:<BR>&gt;&gt;&gt;&gt; You will receive all events. If you =
receive=20
[EInvalidationObject extends <BR>&gt;&gt;&gt;&gt; =
Notification]&nbsp; it=20
is because the objects have been invalidate. At this =
<BR>&gt;&gt;&gt;&gt;=20
point you can do whatever you would=20
like.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; This feature is in=20
experimentation... but seem to work=20
fine.<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; What do you think of =
that=20
feature Eike ?<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt; I'm not sure if =
I=20
understand this. Could you please explain it once =
more?<BR>&gt;&gt;&gt;=20
Currently the process of *invalidation* doesn't directly lead to =
EMF=20
<BR>&gt;&gt;&gt; *notification*, that's true.<BR>&gt;&gt;&gt; And =
intended=20
since it is not a modification of values at once.<BR>&gt;&gt;&gt; =
But=20
subsequent access to an invalidated object will lead to automatic=20
<BR>&gt;&gt;&gt; reload.<BR>&gt;&gt;&gt;<BR>&gt;&gt; I have added =
one=20
interface name InvalidateNotification (extends <BR>&gt;&gt; =
Notification)=20
and InvalidationInvocationImpl (implements <BR>&gt;&gt;=20
InvalidateNotifcation).<BR>&gt;&gt; The goal here is to simplify =
the=20
user...CDO will notify with a <BR>&gt;&gt;=20
CDOSessionInvalidationEvent.<BR>&gt;&gt; =
CDOSessionInvalidationEvent=20
contains a list of CDOID.&nbsp; To simplify the user <BR>&gt;&gt; =
that are=20
interested in a special object... they only ned to<BR>&gt;&gt;=20
<BR>&gt;&gt; =
objectOfInterest.eAdapters().add(eAdapter)<BR>&gt;&gt;=20
<BR>&gt;&gt; And they will be notify.<BR>&gt;&gt; <BR>&gt;&gt; =
CDOView has=20
a feature called enableInvalidateNotifications to determine =
<BR>&gt;&gt;=20
wether or not a specific view should notify =
invalidation.<BR>&gt;&gt;=20
<BR>&gt;&gt; (Right now, I put it under CDOSessionExtended... and =
I take=20
the CDOView in <BR>&gt;&gt; parameters... since I can only extend=20
CDOTransaction... and not CDOViewImpl <BR>&gt;&gt; ... since I =
don`t want=20
to subclass both of them... So I add my feature under <BR>&gt;&gt; =

CDOSEssionExtended.. and pass the CDOView in parameters)<BR>&gt; =
<BR>&gt;=20
The context/scope of invalidations is always the session.<BR>&gt; =
When an=20
InvalidationIndication arrives at the client session the following =

happens:<BR>&gt; <BR>&gt;&nbsp;&nbsp; public void=20
CDOSessionImpl.notifyInvalidation(long timeStamp, Set&lt;CDOID&gt; =

dirtyOIDs, CDOViewImpl excludedView)<BR>&gt;&nbsp;&nbsp;=20
{<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; dirtyOIDs =3D=20
=
Collections.unmodifiableSet(dirtyOIDs);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
for (CDOViewImpl view : =
getViews())<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp; if (view !=3D=20
excludedView)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;=20
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
try<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
=
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
*view.notifyInvalidation(timeStamp,=20
=
dirtyOIDs);*<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp; catch=20
(RuntimeException=20
ex)<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
=
{<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
=
OM.LOG.error(ex);<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=
=20
}<BR> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;=20
}<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; *fireEvent(new=20
InvalidationEvent(excludedView, timeStamp,=20
dirtyOIDs));*<BR>&gt;&nbsp;&nbsp; }<BR>&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; All views of the session are =
notified by=20
direct calls.</FONT></DIV><FONT face=3DArial size=3D2></FONT>
<DIV><FONT face=3DArial size=3D2><BR>&gt; If the transaction that =
caused the=20
invalidation is part of the same session it is excluded from=20
notification.<BR>&gt; After that all higher level listeners are =
notified,=20
for example CDOEditor.<BR>&gt; <BR>&gt; Why do you want to use =
CDOView as=20
the context?<BR>&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>Consumer always work=20
with views.. right ?&nbsp;EObject are attached to CDOView...=20
</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>When =
the user=20
activate this feature... The CDOView listen=20
to&nbsp;CDOevent</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>When =
I received event=20
I do the following</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>public=20
void notifyEvent(IEvent event) </FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>{</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>if (event=20
instanceof CDOSessionInvalidationEvent)</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>{</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; CDOSessionInvalidationEvent =
invalidateEvent =3D=20
(CDOSessionInvalidationEvent)event;</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; for (CDOID id :=20
invalidateEvent.getDirtyOIDs())</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; {</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if=20
(cdoView.isObjectRegistered(id))</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
{</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
EObject=20
object =3D cdoView.getObject(id);</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
=
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
InvalidateNotification invalidateObject =3D new=20
InvalidateNotification(object); </FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
object.eNotify( invalidateObject );</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
=
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;}</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
}</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp; }</FONT></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>}</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></DIV>
<DIV><FONT face=3DArial size=3D2>Make sense ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>&gt; <BR>&gt;&gt;&gt; The =
CDOEditor can=20
update invalidated objects at once (was and will be =
<BR>&gt;&gt;&gt;=20
optional) because it listens to the CDOInvalidatenEvents of the=20
<BR>&gt;&gt;&gt; CDOSession.<BR>&gt;&gt;&gt; It's not the default=20
behaviour that invalidated objects are reloaded at =
<BR>&gt;&gt;&gt; once.=20
This is only a feature of the UI.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; =
Ahh, I=20
guess you want to use a similar mechanism (CDOEventHandler) to =
fire=20
<BR>&gt;&gt;&gt; notifications that are subclasses of =
<BR>&gt;&gt;&gt;=20
org.eclipse.emf.common.notify.Notification?<BR>&gt;&gt;&gt; Just =
like the=20
RESOLVED notifications...<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Yes, =
that seems=20
to be a nice feature. Please open a feature request so =
<BR>&gt;&gt;&gt;=20
that I can review yur patch.<BR>&gt;&gt;&gt;<BR>&gt;&gt; =
<BR>&gt;&gt; Do=20
you want me to redesign the code to show it how it should be ... =
or to=20
<BR>&gt;&gt; have the code with my CDOSessionExtended ?<BR>&gt; =
<BR>&gt;=20
If it's not too much work for you it's more convenient for me if =
you=20
attach a patch that shows how you would integrate it directly into =
the=20
existing code.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; <BR>&gt; Cheers<BR>&gt; =
/Eike<BR>&gt;=20
=
<BR>&gt;</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE ></BODY></HTML=
>

------=_NextPart_000_03DF_01C7ECF7.7ABE0820--
Re: [CDO][0.8.0] Information about development [message #609617 is a reply to message #95190] Sun, 02 September 2007 10:16 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Simon,
I have been following this thread and saw that your were referring to Teneo/Elver. I am curious are
you integrating Teneo/Hibernate with CDO or are you working on a direct Hibernate/CDO integration?

gr. Martin

Simon McDuff wrote:
> I forgot to answer that thread.. sorry..
>
> Here are some details about hibernate and dynamic. I didn`t test it.. but
> I`m pretty sure it supports dynamic model.
>
> http://www.elver.org/hibernate/dynamic.html
>
> Hibernate does support many things. For versionning... I planned to add a
> few attributes at the persistence layer. It will be configurable.
>
> Generic O/R mapping it is something that could go very far (if we talk about
> feature and optimization).
> I would not like to do my own implementation... it will be too time
> consuming!!!
>
> You are courageous. Good luck!!
>
> Simon
>
>
>
> "Eike Stepper" <stepper@sympedia.de> a écrit dans le message de news:
> famp7o$9pe$2@build.eclipse.org...
>> Simon,
>>
>> Good question, if I remember correctly the Hibernate project was not
>> started when I published the first version of of CDO.
>> And even later Hibernate was not able to work with dynamic models (I'm not
>> a Hibernate expert, so please correct me if I'm wrong).
>> Today I'm curious whether it will be easily possible to implement all the
>> advanced features of CDO (for example transparent versioning, branching in
>> the future) with Hibernate.
>> I hope I will be able to learn from your Hibernate based IStore
>> implementation ;-)
>>
>> Cheers
>> /Eike
>>
>>
>> Simon McDuff schrieb:
>>> I was looking at the file that was modified on the project... and it
>>> seems that your are building a generic framework to access relational
>>> database as well as a mapping strategy. Hibernate is already doing
>>> that...
>>> My question is the following.. What its the improvement you are doing
>>> that Hibernate doesn't have ? You probably have a good answer for me!!!
>>>
>>>
>>>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [CDO][0.8.0] Information about development [message #609618 is a reply to message #95454] Sun, 02 September 2007 11:07 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6629
Registered: July 2009
Senior Member
Hi Martin,

Simon can give you more details but I don't think he uses Teneo for his
Hibernate integration with CDO.
The reason is that he integrates with the CDO server which doesn't know
about EMF at all.
I believe Teneo integrates Hibernate with EMF on the client side. A CDO
client in turn doesn't know about DBs, JDBC or Hibernate.

Enjoy your weekend ;-)
/Eike

BTW. Are you planing to visit Eclipse Summit Europe?


Martin Taal schrieb:
> Hi Simon,
> I have been following this thread and saw that your were referring to
> Teneo/Elver. I am curious are you integrating Teneo/Hibernate with CDO
> or are you working on a direct Hibernate/CDO integration?
>
> gr. Martin
>
> Simon McDuff wrote:
>> I forgot to answer that thread.. sorry..
>>
>> Here are some details about hibernate and dynamic. I didn`t test it..
>> but I`m pretty sure it supports dynamic model.
>>
>> http://www.elver.org/hibernate/dynamic.html
>>
>> Hibernate does support many things. For versionning... I planned to
>> add a few attributes at the persistence layer. It will be configurable.
>>
>> Generic O/R mapping it is something that could go very far (if we
>> talk about feature and optimization).
>> I would not like to do my own implementation... it will be too time
>> consuming!!!
>>
>> You are courageous. Good luck!!
>>
>> Simon
>>
>>
>>
>> "Eike Stepper" <stepper@sympedia.de> a écrit dans le message de news:
>> famp7o$9pe$2@build.eclipse.org...
>>> Simon,
>>>
>>> Good question, if I remember correctly the Hibernate project was not
>>> started when I published the first version of of CDO.
>>> And even later Hibernate was not able to work with dynamic models
>>> (I'm not a Hibernate expert, so please correct me if I'm wrong).
>>> Today I'm curious whether it will be easily possible to implement
>>> all the advanced features of CDO (for example transparent
>>> versioning, branching in the future) with Hibernate.
>>> I hope I will be able to learn from your Hibernate based IStore
>>> implementation ;-)
>>>
>>> Cheers
>>> /Eike
>>>
>>>
>>> Simon McDuff schrieb:
>>>> I was looking at the file that was modified on the project... and
>>>> it seems that your are building a generic framework to access
>>>> relational database as well as a mapping strategy. Hibernate is
>>>> already doing that...
>>>> My question is the following.. What its the improvement you are
>>>> doing that Hibernate doesn't have ? You probably have a good answer
>>>> for me!!!
>>>>
>>>>
>>>>
>>
>>
>
>


Re: [CDO][0.8.0] Information about development [message #609620 is a reply to message #95454] Sun, 02 September 2007 19:03 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Hi Martin,

I`m working with a direct Hibernate/CDO integration (long-term plan) . But
I`m looking at teneo framework... because I assume it creates model in
hibernate from EMF. What we have it is something that looks like EMF... so
this project (teneo) as certainly code that I could inspire or I could use
at the beginning !!

But for performance reasons... I would like to go directly to Hibernate
without creating EObject...

DOo you have a idea of the overhead uses from Teneo on top of hibernate ?

Simon




"Martin Taal" <mtaal@elver.org> a
Re: [CDO][0.8.0] Information about development [message #609621 is a reply to message #95500] Sun, 02 September 2007 20:58 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Simon,
Yes Teneo creates a hibernate mapping from the ecore model (and the jpa-like annotations in the
ecore model). Teneo assumes that the objects implement EObject. So using emf/ecore is a prerequisite.
Teneo is not really placed on top of hibernate but more inside hibernate. It extends hibernate from
the inside by supplying different property accessors (and some other minor changes). So Teneo is
only visible in the initialization phase of an app. After getting the
sessionfactory/entitymanagerfactory from Teneo it is all direct hibernate from there.

The main difference between teneo with hibernate and straight hibernate is the use of different
property accessors. Hibernate uses reflection, while Teneo uses accessors which talk to the EMF
eGet/eSet methods. I am not sure if this a performance hit or benefit. My feel is that it does not
matter that much.

gr. Martin

Simon McDuff wrote:
> Hi Martin,
>
> I`m working with a direct Hibernate/CDO integration (long-term plan) . But
> I`m looking at teneo framework... because I assume it creates model in
> hibernate from EMF. What we have it is something that looks like EMF... so
> this project (teneo) as certainly code that I could inspire or I could use
> at the beginning !!
>
> But for performance reasons... I would like to go directly to Hibernate
> without creating EObject...
>
> DOo you have a idea of the overhead uses from Teneo on top of hibernate ?
>
> Simon
>
>
>
>
> "Martin Taal" <mtaal@elver.org> a écrit dans le message de news:
> fbe2ik$blk$1@build.eclipse.org...
>> Hi Simon,
>> I have been following this thread and saw that your were referring to
>> Teneo/Elver. I am curious are you integrating Teneo/Hibernate with CDO or
>> are you working on a direct Hibernate/CDO integration?
>>
>> gr. Martin
>>
>> Simon McDuff wrote:
>>> I forgot to answer that thread.. sorry..
>>>
>>> Here are some details about hibernate and dynamic. I didn`t test it.. but
>>> I`m pretty sure it supports dynamic model.
>>>
>>> http://www.elver.org/hibernate/dynamic.html
>>>
>>> Hibernate does support many things. For versionning... I planned to add a
>>> few attributes at the persistence layer. It will be configurable.
>>>
>>> Generic O/R mapping it is something that could go very far (if we talk
>>> about feature and optimization).
>>> I would not like to do my own implementation... it will be too time
>>> consuming!!!
>>>
>>> You are courageous. Good luck!!
>>>
>>> Simon
>>>
>>>
>>>
>>> "Eike Stepper" <stepper@sympedia.de> a écrit dans le message de news:
>>> famp7o$9pe$2@build.eclipse.org...
>>>> Simon,
>>>>
>>>> Good question, if I remember correctly the Hibernate project was not
>>>> started when I published the first version of of CDO.
>>>> And even later Hibernate was not able to work with dynamic models (I'm
>>>> not a Hibernate expert, so please correct me if I'm wrong).
>>>> Today I'm curious whether it will be easily possible to implement all
>>>> the advanced features of CDO (for example transparent versioning,
>>>> branching in the future) with Hibernate.
>>>> I hope I will be able to learn from your Hibernate based IStore
>>>> implementation ;-)
>>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>>
>>>> Simon McDuff schrieb:
>>>>> I was looking at the file that was modified on the project... and it
>>>>> seems that your are building a generic framework to access relational
>>>>> database as well as a mapping strategy. Hibernate is already doing
>>>>> that...
>>>>> My question is the following.. What its the improvement you are doing
>>>>> that Hibernate doesn't have ? You probably have a good answer for me!!!
>>>>>
>>>>>
>>>>>
>>>
>>
>> --
>>
>> With Regards, Martin Taal
>>
>> Springsite/Elver.org
>> Office: Hardwareweg 4, 3821 BV Amersfoort
>> Postal: Nassaulaan 7, 3941 EC Doorn
>> The Netherlands
>> Tel: +31 (0)84 420 2397
>> Fax: +31 (0)84 225 9307
>> Mail: mtaal@springsite.com - mtaal@elver.org
>> Web: www.springsite.com - www.elver.org
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [CDO][0.8.0] Information about development [message #609624 is a reply to message #95516] Sun, 02 September 2007 22:18 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
This is good the hear.

So probably I will get a look at your code to understand how you extend
hibernate.
I`m sure I will learn a lot from there... since I`m not an expert in
hibernate.

My end goal is also to be able to use JPA at the consumer side.

Thank you Martin!

Simon

"Martin Taal" <mtaal@elver.org> a
Re: [CDO][0.8.0] Information about development [message #609631 is a reply to message #95469] Mon, 03 September 2007 12:30 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Eike,
Teneo is used server side also by some people. But they code the client server communication
themselves. It would be very interesting to have an integration between Teneo/hibernate and
cdo-server to also allow Teneo users to benefit from your client-server framework.

Because a teneo/hibernate user does not really 'see' Teneo (after initialization he/she works with
straight hibernate and emf generated java) it would mean (afaics) that a cdo-hibernate integration
(what Simon is working on) will also cover cdo-hibernate/teneo. Thereby making cdo client-server
available for teneo users. In practice there will for sure be some obstacles but therefore my interest.

btw, I am not yet sure if I will be going to eclipse summit.

gr. Martin

Eike Stepper wrote:
> Hi Martin,
>
> Simon can give you more details but I don't think he uses Teneo for his
> Hibernate integration with CDO.
> The reason is that he integrates with the CDO server which doesn't know
> about EMF at all.
> I believe Teneo integrates Hibernate with EMF on the client side. A CDO
> client in turn doesn't know about DBs, JDBC or Hibernate.
>
> Enjoy your weekend ;-)
> /Eike
>
> BTW. Are you planing to visit Eclipse Summit Europe?
>
>
> Martin Taal schrieb:
>> Hi Simon,
>> I have been following this thread and saw that your were referring to
>> Teneo/Elver. I am curious are you integrating Teneo/Hibernate with CDO
>> or are you working on a direct Hibernate/CDO integration?
>>
>> gr. Martin
>>
>> Simon McDuff wrote:
>>> I forgot to answer that thread.. sorry..
>>>
>>> Here are some details about hibernate and dynamic. I didn`t test it..
>>> but I`m pretty sure it supports dynamic model.
>>>
>>> http://www.elver.org/hibernate/dynamic.html
>>>
>>> Hibernate does support many things. For versionning... I planned to
>>> add a few attributes at the persistence layer. It will be configurable.
>>>
>>> Generic O/R mapping it is something that could go very far (if we
>>> talk about feature and optimization).
>>> I would not like to do my own implementation... it will be too time
>>> consuming!!!
>>>
>>> You are courageous. Good luck!!
>>>
>>> Simon
>>>
>>>
>>>
>>> "Eike Stepper" <stepper@sympedia.de> a écrit dans le message de news:
>>> famp7o$9pe$2@build.eclipse.org...
>>>> Simon,
>>>>
>>>> Good question, if I remember correctly the Hibernate project was not
>>>> started when I published the first version of of CDO.
>>>> And even later Hibernate was not able to work with dynamic models
>>>> (I'm not a Hibernate expert, so please correct me if I'm wrong).
>>>> Today I'm curious whether it will be easily possible to implement
>>>> all the advanced features of CDO (for example transparent
>>>> versioning, branching in the future) with Hibernate.
>>>> I hope I will be able to learn from your Hibernate based IStore
>>>> implementation ;-)
>>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>>
>>>> Simon McDuff schrieb:
>>>>> I was looking at the file that was modified on the project... and
>>>>> it seems that your are building a generic framework to access
>>>>> relational database as well as a mapping strategy. Hibernate is
>>>>> already doing that...
>>>>> My question is the following.. What its the improvement you are
>>>>> doing that Hibernate doesn't have ? You probably have a good answer
>>>>> for me!!!
>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [CDO][0.8.0] Information about development [message #609633 is a reply to message #95702] Mon, 03 September 2007 13:02 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6629
Registered: July 2009
Senior Member
Hi Martin,

I guess that people who use Teneo at their server side also have EMF at
their server side so that Teneo can mediate between EMF and Hibernate.
The situation with CDO is a bit different (please correct me if I'm
wrong with Teneo):
- The CDO client framework mediates between EMF and the CDO protocol (a
Net4j custom application protocol)
- The CDO server framework mediates between the CDO protocol and the CDO
storage framework (my mapper as RI, Simon has implementations for OODB
and Hibernate)

Of course if your server side users need a really good client/server
communications framework (fast, scalable, NIO based buffered
non-blocking, convenient, ...) I'd appreciate if they take a look at
Net4j ;-)
I can help if there is interest.

Cheers
/Eike


Martin Taal schrieb:
> Hi Eike,
> Teneo is used server side also by some people. But they code the
> client server communication themselves. It would be very interesting
> to have an integration between Teneo/hibernate and cdo-server to also
> allow Teneo users to benefit from your client-server framework.
>
> Because a teneo/hibernate user does not really 'see' Teneo (after
> initialization he/she works with straight hibernate and emf generated
> java) it would mean (afaics) that a cdo-hibernate integration (what
> Simon is working on) will also cover cdo-hibernate/teneo. Thereby
> making cdo client-server available for teneo users. In practice there
> will for sure be some obstacles but therefore my interest.
>
> btw, I am not yet sure if I will be going to eclipse summit.
>
> gr. Martin
>
> Eike Stepper wrote:
>> Hi Martin,
>>
>> Simon can give you more details but I don't think he uses Teneo for
>> his Hibernate integration with CDO.
>> The reason is that he integrates with the CDO server which doesn't
>> know about EMF at all.
>> I believe Teneo integrates Hibernate with EMF on the client side. A
>> CDO client in turn doesn't know about DBs, JDBC or Hibernate.
>>
>> Enjoy your weekend ;-)
>> /Eike
>>
>> BTW. Are you planing to visit Eclipse Summit Europe?
>>
>>
>> Martin Taal schrieb:
>>> Hi Simon,
>>> I have been following this thread and saw that your were referring
>>> to Teneo/Elver. I am curious are you integrating Teneo/Hibernate
>>> with CDO or are you working on a direct Hibernate/CDO integration?
>>>
>>> gr. Martin
>>>
>>> Simon McDuff wrote:
>>>> I forgot to answer that thread.. sorry..
>>>>
>>>> Here are some details about hibernate and dynamic. I didn`t test
>>>> it.. but I`m pretty sure it supports dynamic model.
>>>>
>>>> http://www.elver.org/hibernate/dynamic.html
>>>>
>>>> Hibernate does support many things. For versionning... I planned to
>>>> add a few attributes at the persistence layer. It will be
>>>> configurable.
>>>>
>>>> Generic O/R mapping it is something that could go very far (if we
>>>> talk about feature and optimization).
>>>> I would not like to do my own implementation... it will be too time
>>>> consuming!!!
>>>>
>>>> You are courageous. Good luck!!
>>>>
>>>> Simon
>>>>
>>>>
>>>>
>>>> "Eike Stepper" <stepper@sympedia.de> a écrit dans le message de
>>>> news: famp7o$9pe$2@build.eclipse.org...
>>>>> Simon,
>>>>>
>>>>> Good question, if I remember correctly the Hibernate project was
>>>>> not started when I published the first version of of CDO.
>>>>> And even later Hibernate was not able to work with dynamic models
>>>>> (I'm not a Hibernate expert, so please correct me if I'm wrong).
>>>>> Today I'm curious whether it will be easily possible to implement
>>>>> all the advanced features of CDO (for example transparent
>>>>> versioning, branching in the future) with Hibernate.
>>>>> I hope I will be able to learn from your Hibernate based IStore
>>>>> implementation ;-)
>>>>>
>>>>> Cheers
>>>>> /Eike
>>>>>
>>>>>
>>>>> Simon McDuff schrieb:
>>>>>> I was looking at the file that was modified on the project... and
>>>>>> it seems that your are building a generic framework to access
>>>>>> relational database as well as a mapping strategy. Hibernate is
>>>>>> already doing that...
>>>>>> My question is the following.. What its the improvement you are
>>>>>> doing that Hibernate doesn't have ? You probably have a good
>>>>>> answer for me!!!
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>
>>>
>
>


Previous Topic:update site not working?
Next Topic:Teneo/Hibernate Column Annotation Column
Goto Forum:
  


Current Time: Sat Aug 13 00:48:02 GMT 2022

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

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

Back to the top