Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » CDO and SessionInvalidationListener
CDO and SessionInvalidationListener [message #62357] Mon, 20 November 2006 16:56 Go to next message
Eclipse UserFriend
Originally posted by: yannick.lizzi.silogic.fr

Hi all,

I have the following model:
Meeting #-> User (aggregation), named "participants"
Session --> Meeting (association)
Session --> User (association), named "queue".

I have two clients and one server. My purpose is to maintain the 'queue'
relation up to date on both client sides.
When I add a user (already defined in meeting aggregation) to the queue
on one side, I see it on the other side. But when I remove a user the
other side is not notified.

I use the following session invalidation listener:
class SessionInvalidationListener implements
ResourceManager.InvalidationListener {
public void notifyInvalidation(ResourceManager manager,
List<EObject> invalidated, List<EObject> deferred) {

for (EObject o : invalidated) {
CDOPersistent cdoObj = (CDOPersistent) o;
cdoObj.load(); // Used to notify my viewer listening to model changes

// the following is for test only
if (cdoObj instanceof Session) {
Session s = (Session) cdoObj;
System.out.println("queue="+s.getQueue());
}
}

}
}

When I add a user to the queue, the queue is modified. But when a user
is removed the queue is always displaying the state before the remove.


Thanks,

Yannick
Re: CDO and SessionInvalidationListener [message #62381 is a reply to message #62357] Mon, 20 November 2006 18:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Yannick,

Eike is on vacation until Dec 6 so likely you won't get an answer before
then.


Yannick Lizzi wrote:
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the
> 'queue' relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the
> queue on one side, I see it on the other side. But when I remove a
> user the other side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager,
> List<EObject> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model
> changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user
> is removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick
Re: CDO and SessionInvalidationListener [message #62634 is a reply to message #62357] Fri, 24 November 2006 05:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sperez.miragenetworks.com

I see the same thing (or something very similar). Specifically, in
AbstractDataRequest.receiveObject(...), I see where the new objects are
added in receiveReferences(...), but I see no place where a removed object
gets removed.

In my specific use case I am moving an object from a non-containment
reference of one object to another. When the object is moved from one list
to the other, the object apears to be in both lists.

Patiently waiting until Dec. 6,

Stephen


"Yannick Lizzi" <yannick.lizzi@silogic.fr> wrote in message
news:ejsmni$5a7$1@utils.eclipse.org...
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the 'queue'
> relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the queue on
> one side, I see it on the other side. But when I remove a user the other
> side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager, List<EObject>
> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user is
> removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick
Re: CDO and SessionInvalidationListener [message #64612 is a reply to message #62357] Sat, 16 December 2006 09:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Yannick, Stephen,

Sorry for the delay, but I'm starting to dig into this issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321

Cheers
/Eike


Yannick Lizzi schrieb:
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the
> 'queue' relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the
> queue on one side, I see it on the other side. But when I remove a
> user the other side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager,
> List<EObject> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model
> changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user
> is removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick
Re: CDO and SessionInvalidationListener [message #64887 is a reply to message #64612] Tue, 19 December 2006 15:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Yannick, Stephen,

I have fixed this bug and committed the changes to branch
R0_7_maintenance. Unfortunately the build system is not usable for me at
the moment. As soon as it is I will publish new builds.

Cheers
/Eike



Eike Stepper schrieb:
> Yannick, Stephen,
>
> Sorry for the delay, but I'm starting to dig into this issue:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321
>
> Cheers
> /Eike
>
>
> Yannick Lizzi schrieb:
>> Hi all,
>>
>> I have the following model:
>> Meeting #-> User (aggregation), named "participants"
>> Session --> Meeting (association)
>> Session --> User (association), named "queue".
>>
>> I have two clients and one server. My purpose is to maintain the
>> 'queue' relation up to date on both client sides.
>> When I add a user (already defined in meeting aggregation) to the
>> queue on one side, I see it on the other side. But when I remove a
>> user the other side is not notified.
>>
>> I use the following session invalidation listener:
>> class SessionInvalidationListener implements
>> ResourceManager.InvalidationListener {
>> public void notifyInvalidation(ResourceManager manager,
>> List<EObject> invalidated, List<EObject> deferred) {
>>
>> for (EObject o : invalidated) {
>> CDOPersistent cdoObj = (CDOPersistent) o;
>> cdoObj.load(); // Used to notify my viewer listening to model
>> changes
>>
>> // the following is for test only
>> if (cdoObj instanceof Session) {
>> Session s = (Session) cdoObj;
>> System.out.println("queue="+s.getQueue());
>> }
>> }
>>
>> }
>> }
>>
>> When I add a user to the queue, the queue is modified. But when a
>> user is removed the queue is always displaying the state before the
>> remove.
>>
>>
>> Thanks,
>>
>> Yannick
Re: CDO and SessionInvalidationListener [message #65280 is a reply to message #64887] Thu, 21 December 2006 11:02 Go to previous message
Eclipse UserFriend
Originally posted by: yannick.lizzi.silogic.fr

Eike,

Now, it works thanks.

Yannick


> Yannick, Stephen,
>
> I have fixed this bug and committed the changes to branch
> R0_7_maintenance. Unfortunately the build system is not usable for me at
> the moment. As soon as it is I will publish new builds.
>
> Cheers
> /Eike
>
>
>
> Eike Stepper schrieb:
>> Yannick, Stephen,
>>
>> Sorry for the delay, but I'm starting to dig into this issue:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321
>>
>> Cheers
>> /Eike
>>
>>
>> Yannick Lizzi schrieb:
>>> Hi all,
>>>
>>> I have the following model:
>>> Meeting #-> User (aggregation), named "participants"
>>> Session --> Meeting (association)
>>> Session --> User (association), named "queue".
>>>
>>> I have two clients and one server. My purpose is to maintain the
>>> 'queue' relation up to date on both client sides.
>>> When I add a user (already defined in meeting aggregation) to the
>>> queue on one side, I see it on the other side. But when I remove a
>>> user the other side is not notified.
>>>
>>> I use the following session invalidation listener:
>>> class SessionInvalidationListener implements
>>> ResourceManager.InvalidationListener {
>>> public void notifyInvalidation(ResourceManager manager,
>>> List<EObject> invalidated, List<EObject> deferred) {
>>>
>>> for (EObject o : invalidated) {
>>> CDOPersistent cdoObj = (CDOPersistent) o;
>>> cdoObj.load(); // Used to notify my viewer listening to model
>>> changes
>>>
>>> // the following is for test only
>>> if (cdoObj instanceof Session) {
>>> Session s = (Session) cdoObj;
>>> System.out.println("queue="+s.getQueue());
>>> }
>>> }
>>>
>>> }
>>> }
>>>
>>> When I add a user to the queue, the queue is modified. But when a
>>> user is removed the queue is always displaying the state before the
>>> remove.
>>>
>>>
>>> Thanks,
>>>
>>> Yannick
Re: CDO and SessionInvalidationListener [message #596006 is a reply to message #62357] Mon, 20 November 2006 18:27 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31770
Registered: July 2009
Senior Member
Yannick,

Eike is on vacation until Dec 6 so likely you won't get an answer before
then.


Yannick Lizzi wrote:
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the
> 'queue' relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the
> queue on one side, I see it on the other side. But when I remove a
> user the other side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager,
> List<EObject> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model
> changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user
> is removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: CDO and SessionInvalidationListener [message #596120 is a reply to message #62357] Fri, 24 November 2006 05:35 Go to previous message
Eclipse UserFriend
Originally posted by: sperez.miragenetworks.com

I see the same thing (or something very similar). Specifically, in
AbstractDataRequest.receiveObject(...), I see where the new objects are
added in receiveReferences(...), but I see no place where a removed object
gets removed.

In my specific use case I am moving an object from a non-containment
reference of one object to another. When the object is moved from one list
to the other, the object apears to be in both lists.

Patiently waiting until Dec. 6,

Stephen


"Yannick Lizzi" <yannick.lizzi@silogic.fr> wrote in message
news:ejsmni$5a7$1@utils.eclipse.org...
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the 'queue'
> relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the queue on
> one side, I see it on the other side. But when I remove a user the other
> side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager, List<EObject>
> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user is
> removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick
Re: CDO and SessionInvalidationListener [message #596956 is a reply to message #62357] Sat, 16 December 2006 09:36 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6538
Registered: July 2009
Senior Member
Yannick, Stephen,

Sorry for the delay, but I'm starting to dig into this issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321

Cheers
/Eike


Yannick Lizzi schrieb:
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the
> 'queue' relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the
> queue on one side, I see it on the other side. But when I remove a
> user the other side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager,
> List<EObject> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model
> changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user
> is removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick


Re: CDO and SessionInvalidationListener [message #597090 is a reply to message #64612] Tue, 19 December 2006 15:13 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6538
Registered: July 2009
Senior Member
Yannick, Stephen,

I have fixed this bug and committed the changes to branch
R0_7_maintenance. Unfortunately the build system is not usable for me at
the moment. As soon as it is I will publish new builds.

Cheers
/Eike



Eike Stepper schrieb:
> Yannick, Stephen,
>
> Sorry for the delay, but I'm starting to dig into this issue:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321
>
> Cheers
> /Eike
>
>
> Yannick Lizzi schrieb:
>> Hi all,
>>
>> I have the following model:
>> Meeting #-> User (aggregation), named "participants"
>> Session --> Meeting (association)
>> Session --> User (association), named "queue".
>>
>> I have two clients and one server. My purpose is to maintain the
>> 'queue' relation up to date on both client sides.
>> When I add a user (already defined in meeting aggregation) to the
>> queue on one side, I see it on the other side. But when I remove a
>> user the other side is not notified.
>>
>> I use the following session invalidation listener:
>> class SessionInvalidationListener implements
>> ResourceManager.InvalidationListener {
>> public void notifyInvalidation(ResourceManager manager,
>> List<EObject> invalidated, List<EObject> deferred) {
>>
>> for (EObject o : invalidated) {
>> CDOPersistent cdoObj = (CDOPersistent) o;
>> cdoObj.load(); // Used to notify my viewer listening to model
>> changes
>>
>> // the following is for test only
>> if (cdoObj instanceof Session) {
>> Session s = (Session) cdoObj;
>> System.out.println("queue="+s.getQueue());
>> }
>> }
>>
>> }
>> }
>>
>> When I add a user to the queue, the queue is modified. But when a
>> user is removed the queue is always displaying the state before the
>> remove.
>>
>>
>> Thanks,
>>
>> Yannick


Re: CDO and SessionInvalidationListener [message #597270 is a reply to message #64887] Thu, 21 December 2006 11:02 Go to previous message
Eclipse UserFriend
Originally posted by: yannick.lizzi.silogic.fr

Eike,

Now, it works thanks.

Yannick


> Yannick, Stephen,
>
> I have fixed this bug and committed the changes to branch
> R0_7_maintenance. Unfortunately the build system is not usable for me at
> the moment. As soon as it is I will publish new builds.
>
> Cheers
> /Eike
>
>
>
> Eike Stepper schrieb:
>> Yannick, Stephen,
>>
>> Sorry for the delay, but I'm starting to dig into this issue:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321
>>
>> Cheers
>> /Eike
>>
>>
>> Yannick Lizzi schrieb:
>>> Hi all,
>>>
>>> I have the following model:
>>> Meeting #-> User (aggregation), named "participants"
>>> Session --> Meeting (association)
>>> Session --> User (association), named "queue".
>>>
>>> I have two clients and one server. My purpose is to maintain the
>>> 'queue' relation up to date on both client sides.
>>> When I add a user (already defined in meeting aggregation) to the
>>> queue on one side, I see it on the other side. But when I remove a
>>> user the other side is not notified.
>>>
>>> I use the following session invalidation listener:
>>> class SessionInvalidationListener implements
>>> ResourceManager.InvalidationListener {
>>> public void notifyInvalidation(ResourceManager manager,
>>> List<EObject> invalidated, List<EObject> deferred) {
>>>
>>> for (EObject o : invalidated) {
>>> CDOPersistent cdoObj = (CDOPersistent) o;
>>> cdoObj.load(); // Used to notify my viewer listening to model
>>> changes
>>>
>>> // the following is for test only
>>> if (cdoObj instanceof Session) {
>>> Session s = (Session) cdoObj;
>>> System.out.println("queue="+s.getQueue());
>>> }
>>> }
>>>
>>> }
>>> }
>>>
>>> When I add a user to the queue, the queue is modified. But when a
>>> user is removed the queue is always displaying the state before the
>>> remove.
>>>
>>>
>>> Thanks,
>>>
>>> Yannick
Previous Topic:[Teneo] Setting Id generator from ecore file
Next Topic:How to programmatically generate editor code from .ecore file
Goto Forum:
  


Current Time: Sat Feb 27 22:42:05 GMT 2021

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

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

Back to the top